Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,741 of 243,242    |
|    Lawrence =?iso-8859-13?q?D=FFOlivei to Chris M. Thomasson    |
|    Re: function pointer question    |
|    03 Jan 26 22:05:13    |
   
   From: ldo@nz.invalid   
      
   On Sat, 3 Jan 2026 12:04:47 -0800, Chris M. Thomasson wrote:   
      
   > struct object_prv_vtable {   
   > int (*fp_destroy) (void* const);   
   > };   
   >   
   > ...   
   >   
   > (mp_self)->vtable->object.fp_destroy((mp_self)) \   
      
   which is easier to write than   
      
    (*(mp_self)->vtable->object.fp_destroy)((mp_self))   
      
   , don’t you think? (And similarly for other cases in that code.)   
      
   Look on it as a fudge allowed by C to get around the awkwardness of   
   its inside-out type definitions ...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca