DllExport int SWIGSTDCALL CSharp_rlib_free(void * jarg1) { int jresult = 0 ; rlib *arg1 = (rlib *) 0 ; int result; arg1 = (rlib *)jarg1; result = (int)rlib_free(arg1); jresult = result; return jresult; }
JNIEXPORT jint JNICALL Java_rlibJNI_rlib_1free(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; rlib *arg1 = (rlib *) 0 ; int result; (void)jenv; (void)jcls; arg1 = *(rlib **)&jarg1; result = (int)rlib_free(arg1); jresult = (jint)result; return jresult; }
static PyObject *_wrap_rlib_free(PyObject *self, PyObject *args) { PyObject *resultobj; rlib *arg1 = (rlib *) 0 ; int result; PyObject * obj0 = 0 ; if(!PyArg_ParseTuple(args,(char *)"O:rlib_free",&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_rlib,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; result = (int)rlib_free(arg1); resultobj = PyInt_FromLong((long)result); return resultobj; fail: return NULL; }
int main(int argc, char **argv) { char *conn; rlib *r; if(argc != 2) { fprintf(stderr, "%s requires 2 arguments POSTGRES conn str\n", argv[0]); fprintf(stderr, "You provided %d\n", argc-1); return -1; } conn = argv[1]; fprintf(stderr, "CONN IS %s\n", conn); r = rlib_init(); rlib_add_datasource_postgres(r, "local_postgres", conn); rlib_add_query_as(r, "local_postgres", "select * from example", "example"); rlib_add_report(r, "report.xml"); rlib_set_output_format(r, RLIB_FORMAT_PDF); rlib_execute(r); rlib_spool(r); rlib_free(r); return 0; }