Content deleted Content added
Jerryobject (talk | contribs) Small WP:COPYEDITs WP:EoS: WP:TERSE, clarify. WP:LINK update-standardize. Cut needless carriage returns in sentences, paragraphs, section. WP:CATEGORYs reorder-alphabetize. |
Jerryobject (talk | contribs) m →Callbacks (C): MOS:FIRSTABBReviation clarify, define before WP:ABBR in parentheses. WP:LINKs: add, update-standardize, plural > WP:SINGULAR. Nonlead-word nonproper noun MOS:CAPS > WP:LOWERCASE sentence case. |
||
Line 331:
Some [[C (programming language)|C]] libraries support [[Callback (computer programming)|callbacks]]. This is ometimes implemented by providing two values when registering the callback with the library: a function pointer and a separate <code>void*</code> pointer to arbitrary data of the user's choice. When the library executes the callback function, it passes along the data pointer. This enables the callback to maintain state and to refer to information captured at the time it was registered with the library. The idiom is similar to closures in functionality, but not in syntax. The <code>void*</code> pointer is not [[Type safety|type safe]] so this C idiom differs from type-safe closures in C#, Haskell or ML.
Callbacks are
====Nested function and function pointer (C)====
|