Sha256: d2cd835a0df7dd37bf62006546d715c0df1c9f771026fa8c07a5829c0eed5357

Contents?: true

Size: 956 Bytes

Versions: 10

Compression:

Stored size: 956 Bytes

Contents

#include "logging/RhoLog.h"
#include "syscall.h"

#undef DEFAULT_LOGCATEGORY
#define DEFAULT_LOGCATEGORY "RhoDoSysCall"

PARAMS_WRAPPER* do_syscall(PARAMS_WRAPPER* params) {
	int i;

	//Look through input parameters
	if (params) {
		RAWLOG_INFO1("Calling \"%s\" with parameters:\n", params->_callname);
		for (i=0;i<params->_nparams;i++) {
			RAWLOG_INFO2("%s => %s\n",params->_names[i],params->_values[i]);
		}	
	}
	
	//If synchronous call on ruby thread, generate return parameters 
	if (!params->_call_on_ui_thread) {
		PARAMS_WRAPPER* pw = malloc(sizeof(PARAMS_WRAPPER));
		pw->_nparams = 2;
		pw->_names = malloc(pw->_nparams*sizeof(char*));	
		pw->_values = malloc(pw->_nparams*sizeof(char*));
		for(i=0;i<pw->_nparams;i++){
			pw->_names[i] = malloc(128*sizeof(char));	
			sprintf(pw->_names[i], "key %d", i);
			pw->_values[i] = malloc(128*sizeof(char));		
			sprintf(pw->_values[i], "value %d", i);
		}
		return pw;
	} else {
		return NULL;
	}
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rhodes-1.5.5 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.5.4 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.5.3 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.5.2 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.5.1 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.5.0 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.4.2 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.4.1 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.4.0 platform/iphone/rhoextlib/dosyscall.c
rhodes-1.2.2 platform/iphone/rhoextlib/dosyscall.c