Repair method for parameter mismatching of callback function of module and related equipment

A callback function and repair method technology, which is applied in electrical digital data processing, program control design, multi-programming devices, etc., can solve problems such as program execution crash, module callback function parameter mismatch, etc., to solve search difficulties and ensure stability. running effect

Pending Publication Date: 2022-05-03
WUHAN DOUYU NETWORK TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The invention provides a method for repairing the mismatch of module callback function parameters. By searching for the callback pointers of the original parameter callback functions in all source programs, and calling the virtual function interface corresponding to the callback pointer of the callback class, based on the hook repair technology, it is ignored The new parameter information is added to solve the problem of program execution crash caused by parameter mismatch

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Repair method for parameter mismatching of callback function of module and related equipment
  • Repair method for parameter mismatching of callback function of module and related equipment
  • Repair method for parameter mismatching of callback function of module and related equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The implementation mode of the present invention is illustrated by specific specific examples below, and those who are familiar with this technology can easily understand other advantages and effects of the present invention from the contents disclosed in this description. Obviously, the described embodiments are a part of the present invention. , but not all examples. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0046] It should be noted that, in the description of the present invention, terms such as "middle", "upper", "lower", "horizontal", "inner" and other indicated directions or positional relationships are based on the directions or positional relationships shown in the drawings. The positional relationship, which is just for convenience of description, does not indicate or imply that the device or...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method for repairing mismatched callback function parameters of a module and related equipment. The method comprises the following steps of: obtaining new parameters contained in a callback function type in a repairing program and original parameters contained in an upper callback function of a source program; comparing new parameters with original parameters, and taking different parameters in the new parameters and the original parameters as new parameter information; searching callback pointers about original parameter callback functions in all source programs, and informing an upper layer of allowing basic codes to call extended codes corresponding to newly-added parameter information to repair by utilizing virtual function interfaces corresponding to the callback pointers, so as to neglect the newly-added parameter information. Therefore, the processing logic of the received data is decoupled from the underlying data, an upper layer is notified to allow the basic code to call the extended code corresponding to the newly-added parameter information for restoration, and then the newly-added parameter information is ignored, so that the problem of program execution crash caused by parameter mismatching is solved.

Description

technical field [0001] The invention relates to the technical field of computer program software, in particular to a method for repairing mismatched parameters of a module callback function and related equipment. Background technique [0002] In program development, in order to decouple the code, it is usually used to set the pointer of the callback function to solve the decoupling relationship between the underlying function and the upper-level caller. The execution of the callback function pointer allows the caller to be notified after the execution of the underlying function is completed. [0003] However, the existing problem is that in many cases, program developers will develop the program in modules, and some modules have upgraded code functions, such as adding an additional parameter to an internal notification external callback function, while another module If you do not modify and add parameters to all the places where the callback is used, it will cause a crash p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/72G06F9/48
CPCG06F8/72G06F9/4881
Inventor 周志刚
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products