Subject: [ruby-ffi] Defining an Extern from a Header File |
From: aaalex |
Date: 3/28/11 1:55 AM |
To: ruby-ffi |
Hi ruby-ffi! I run into the problem that I need to define an extern with Ruby FFI, again in the OPSEC library. The extern is defined in one include file like this: extern OpsecEntityType *LEA_SERVER; How can this be defined in the FFI library? The usage of this is inside C source code is like this: pServer = opsec_init_entity(pEnv, LEA_SERVER, OPSEC_EOL); with a function prototype: OpsecEntity *opsec_init_entity (OpsecEnv *env, OpsecEntityType *entity_type, ...); typedef struct _OpsecEntityType OpsecEntityType; -aaalex