comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: OO "void *user_data" in thick library bindings
Date: Thu, 24 Jul 2014 19:56:53 +0300
Date: 2014-07-24T19:56:53+03:00	[thread overview]
Message-ID: <lqrdsi$amp$1@speranza.aioe.org> (raw)

Is it a good idea in thick bindings for a C library to replace every handler 
with user data:

void (*raptor_statement_handler) (void *user_data, *statement);

with a tagged record whose (or its descendant) access is ALWAYS passed as 
user_data? (I mean in my bindings NEVER pass anything other than a 
descendant of my tagged record as user_data. Huh?)

This is object oriented, but maybe a little restrictive. Well, if it would 
be object oriented from the beginnings, it would probably be the way to 
implement it. So, it is probably not too restrictive.

-- 
Victor Porton - http://portonvictor.org

                 reply	other threads:[~2014-07-24 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox