Sha256: 7659b4466b6507122ad8957f37538b6b14bdec7b15bdb2d727f9e7b67578f20d
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
#ifndef RUBY_SFCC_NATIVE #define RUBY_SFCC_NATIVE #include <assert.h> #include <cimc/cimc.h> #include <cimc/cimcdt.h> #include <cimc/cimcft.h> #include <CimClientLib/cmcimacs.h> #include "ruby.h" #include <ruby.h> #ifdef HAVE_RUBY_ST_H # include <ruby/st.h> #else # include <st.h> #endif #include <unistd.h> #include <stdlib.h> extern const char *to_charptr(VALUE v); extern VALUE mSfcc; extern VALUE mSfccCim; extern CIMCEnv *cimcEnv; #define CIMSTR_2_RUBYSTR(x) (x ? (x->ft->getCharPtr(x, NULL) ? rb_str_new2(x->ft->getCharPtr(x, NULL)) : Qnil) : Qnil) /** * raises a ruby exception if the status is an error * whenever possible, adds the custom message if not null */ void sfcc_rb_raise_if_error(CIMCStatus status, const char *msg, ...); /** * allocates a string array where each string points to the * str pointer of the value * * you need to deallocate the array yourself. But don't deallocate * the elements. */ inline char ** sfcc_value_array_to_string_array(VALUE array); /** * converts a CIMCArray to rbArray */ inline VALUE sfcc_cimcarray_to_rubyarray(CIMCArray *array); /** * converts a ruby hash to a CIM args object */ inline CIMCArgs* sfcc_hash_to_cimargs(VALUE hash); /** * converts a CIM args object to a hash */ inline VALUE sfcc_cimargs_to_hash(CIMCArgs *args); /** * converts CIMCData to ruby VALUE */ inline VALUE sfcc_cimdata_to_value(CIMCData data); /** * convert ruby VALUE to CIMCData */ inline CIMCData sfcc_value_to_cimdata(VALUE value); #endif
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sfcc-0.5.0 | ext/sfcc/sfcc.h |