这篇教程C++ GET_STR函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GET_STR函数的典型用法代码示例。如果您正苦于以下问题:C++ GET_STR函数的具体用法?C++ GET_STR怎么用?C++ GET_STR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GET_STR函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: obj_mulObject obj_mul(Object a, Object b) { if (a.type == b.type && a.type == TYPE_NUM) { GET_NUM(a) *= GET_NUM(b); return a; } if (a.type == TYPE_NUM && b.type == TYPE_STR) { Object temp = a; a = b; b = temp; } if (a.type == TYPE_STR && b.type == TYPE_NUM) { int len = GET_STR_LEN(a); Object des; if (len == 0) return a; int times = (int) GET_NUM(b); if (times <= 0) return sz_to_string(""); if (times == 1) return a; des = string_alloc(NULL, len * times); char* s = GET_STR(des); int i; for (i = 0; i < times; i++) { strncpy(s, GET_STR(a), len); s += len; } return des; } tm_raise("obj_mul: can not multiply %o and %o", a, b); return NONE_OBJECT;}
开发者ID:xupingmao,项目名称:minipy,代码行数:32,
示例2: obj_addObject obj_add(Object a, Object b) { if (TM_TYPE(a) == TM_TYPE(b)) { switch (TM_TYPE(a)) { case TYPE_NUM: GET_NUM(a) += GET_NUM(b); return a; case TYPE_STR: { char* sa = GET_STR(a); char* sb = GET_STR(b); int la = GET_STR_LEN(a); int lb = GET_STR_LEN(b); if (la == 0) {return b; } if (lb == 0) {return a; } int len = la + lb; Object des = string_alloc(NULL, len); char*s = GET_STR(des); memcpy(s, sa, la); memcpy(s + la, sb, lb); return des; } case TYPE_LIST: { return list_add(GET_LIST(a), GET_LIST(b)); } } } tm_raise("obj_add: can not add %o and %o", (a), (b)); return NONE_OBJECT;}
开发者ID:xupingmao,项目名称:minipy,代码行数:28,
示例3: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_restoreInodesJNIEXPORT jstring JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_restoreInodes(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring dumppath, jobjectArray filepaths, jobjectArray destinations, jintArray copies, jint replaceType) { char *str = NULL; jboolean isCopy, isCopy2; char *fstr = GET_STR(fsname, isCopy); char *dstr = GET_STR(dumppath, isCopy2); PTRACE(1, "jni:Restore_restoreInodes() entry"); if (-1 == restore_inodes(CTX, fstr, dstr, jarray2lst(env, filepaths, "java/Lang/String", String2charr), jarray2lst(env, destinations, "java/Lang/String", String2charr), jintArray2lst(env, copies), replaceType, &str)) { REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); ThrowEx(env); return (NULL); } REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); PTRACE(1, "jni:Restore_restoreInodes() done"); return (JSTRING(str));}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:31,
示例4: write_mobile_especint write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd){ if (GET_ATTACK(mob) != 0) fprintf(fd, "BareHandAttack: %d/n", GET_ATTACK(mob)); if (GET_STR(mob) != 0) fprintf(fd, "Str: %d/n", GET_STR(mob)); if (GET_ADD(mob) != 0) fprintf(fd, "StrAdd: %d/n", GET_ADD(mob)); if (GET_DEX(mob) != 0) fprintf(fd, "Dex: %d/n", GET_DEX(mob)); if (GET_INT(mob) != 0) fprintf(fd, "Int: %d/n", GET_INT(mob)); if (GET_WIS(mob) != 0) fprintf(fd, "Wis: %d/n", GET_WIS(mob)); if (GET_CON(mob) != 0) fprintf(fd, "Con: %d/n", GET_CON(mob)); if (GET_CHA(mob) != 0) fprintf(fd, "Cha: %d/n", GET_CHA(mob)); if(GET_CLASS(mob) != CLASS_NPC_OTHER) fprintf(fd, "Class: %d/n", GET_CLASS(mob)); if(GET_RACE(mob) != RACE_NPC_OTHER) fprintf(fd, "Race: %d/n", GET_RACE(mob)); if(GET_MOB_WEIGHT(mob)) fprintf(fd, "Weight: %d/n", GET_MOB_WEIGHT(mob)); fprintf(fd, "Size: %d/n", GET_MOB_SIZE(mob)); fputs("E/n", fd); return TRUE;}
开发者ID:vedicveko,项目名称:Aarait,代码行数:30,
示例5: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_getIndexedSnapsJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_getIndexedSnaps(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring snapdir) { jboolean isCopy, isCopy2; char *fstr = GET_STR(fsname, isCopy); char *dstr = GET_STR(snapdir, isCopy2); sqm_lst_t *snaplist = NULL; jobjectArray newArr; PTRACE(1, "jni:Restore_getIndexedSnaps(..., %s) entry", Str(fstr)); if (-1 == get_indexed_snapshots(CTX, fstr, dstr, &snaplist)) { REL_STR(fsname, fstr, isCopy); REL_STR(snapdir, dstr, isCopy2); ThrowEx(env); return (NULL); } REL_STR(fsname, fstr, isCopy); REL_STR(snapdir, dstr, isCopy2); newArr = lst2jarray(env, snaplist, "java/lang/String", charr2String); lst_free_deep(snaplist); PTRACE(1, "jni:Restore_getIndexedSnaps() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:27,
示例6: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_searchFilesJNIEXPORT jstring JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_searchFiles(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring dumppath, jint entries, jstring filepath, jstring restrictions) { char *str = NULL; jboolean isCopy, isCopy2, isCopy3, isCopy4; char *fstr = GET_STR(fsname, isCopy); char *dstr = GET_STR(dumppath, isCopy2); char *cstr = GET_STR(filepath, isCopy3); char *rstr = GET_STR(restrictions, isCopy4); PTRACE(1, "jni:Restore_searchFiles(...,%s, %s) entry", Str(cstr), Str(rstr)); if (-1 == search_versions(CTX, fstr, dstr, (int)entries, cstr, rstr, &str)) { REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); REL_STR(filepath, cstr, isCopy3); REL_STR(restrictions, rstr, isCopy4); ThrowEx(env); return (NULL); } REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); REL_STR(filepath, cstr, isCopy3); REL_STR(restrictions, rstr, isCopy4); PTRACE(1, "jni:Restore_searchFiles() done"); return (JSTRING(str));}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:33,
示例7: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_getVersionDetailsJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_getVersionDetails(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring dumppath, jstring filepath) { sqm_lst_t *detailslst = NULL; jobjectArray newArr; jboolean isCopy, isCopy2, isCopy3; char *fstr = GET_STR(fsname, isCopy); char *dstr = GET_STR(dumppath, isCopy2); char *cstr = GET_STR(filepath, isCopy3); PTRACE(1, "jni:Restore_getVersionDetails(...,%s)", Str(cstr)); if (-1 == get_version_details(CTX, fstr, dstr, cstr, &detailslst)) { REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); REL_STR(filepath, cstr, isCopy3); ThrowEx(env); return (NULL); } REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); REL_STR(filepath, cstr, isCopy3); newArr = lst2jarray(env, detailslst, "java/lang/String", charr2String); lst_free_deep(detailslst); PTRACE(1, "jni:Restore_getVersionDetails() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:32,
示例8: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_takeDumpJNIEXPORT jstring JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_takeDump(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring dumppath) { char *str = NULL; jboolean isCopy, isCopy2; char *fstr = GET_STR(fsname, isCopy); char *dstr = GET_STR(dumppath, isCopy2); PTRACE(1, "jni:Restore_takeDump(...,%s, %s) entry", Str(fstr), Str(dstr)); if (-1 == take_dump(CTX, fstr, dstr, &str)) { REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); ThrowEx(env); return (NULL); } REL_STR(fsname, fstr, isCopy); REL_STR(dumppath, dstr, isCopy2); PTRACE(1, "jni:Restore_takeDump() done"); return (JSTRING(str));}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:25,
示例9: GET_STR// getDumpStatus(fsName, directory);// Calls get_Dump_Status_by_dirJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Restore_getDumpStatus__Lcom_sun_netstorage_samqfs_mgmt_Ctx_2Ljava_lang_String_2Ljava_lang_String_2_3Ljava_lang_String_2(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring directory, jobjectArray dumps) { sqm_lst_t *statuslst = NULL; jobjectArray newArr; jboolean isFsNameCopy; jboolean isDirectoryCopy; char *cstr_fsname = GET_STR(fsname, isFsNameCopy); char *cstr_directory = GET_STR(directory, isDirectoryCopy); PTRACE(1, "jni:Restore_getDumpStatus() entry"); if (-1 == get_dump_status_by_dir(CTX, cstr_fsname, cstr_directory, jarray2lst(env, dumps, "java/lang/String", String2charr), &statuslst)) { REL_STR(fsname, cstr_fsname, isFsNameCopy); REL_STR(directory, cstr_directory, isDirectoryCopy); ThrowEx(env); return (NULL); } REL_STR(fsname, cstr_fsname, isFsNameCopy); REL_STR(directory, cstr_directory, isDirectoryCopy); newArr = lst2jarray(env, statuslst, "java/lang/String", charr2String); lst_free_deep(statuslst); PTRACE(1, "jni:Restore_getDumpStatus() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:32,
示例10: GiveMinStrToWieldint GiveMinStrToWield(struct obj_data *obj, struct char_data *ch){ int str=0; GET_STR(ch) = 16; /* nice, semi-reasonable start */ /* will have a problem with except. str, that i do not care to solve */ while (GET_OBJ_WEIGHT(obj) > str_app[STRENGTH_APPLY_INDEX(ch)].wield_w) GET_STR(ch)++; return(str);}
开发者ID:okeuday,项目名称:sillymud,代码行数:15,
示例11: affect_total/* walk even though they could fly at will. */void affect_total(struct char_data *ch){ struct affected_type *af; int i,j; char buff[200]; for(i=0; i<MAX_WEAR; i++) { if (ch->equipment[i]) for(j=0; j<MAX_OBJ_AFFECT; j++) affect_modify(ch, ch->equipment[i]->affected[j].location, (int)ch->equipment[i]->affected[j].modifier, ch->equipment[i]->obj_flags.bitvector, FALSE); } for(af = ch->affected; af; af=af->next) if(af->type != SPELL_FLY) affect_modify(ch, af->location, (int) af->modifier, af->bitvector, FALSE); ch->tmpabilities = ch->abilities; for(i=0; i<MAX_WEAR; i++) { if (ch->equipment[i]) for(j=0; j<MAX_OBJ_AFFECT; j++) affect_modify(ch, ch->equipment[i]->affected[j].location, (int) ch->equipment[i]->affected[j].modifier, ch->equipment[i]->obj_flags.bitvector, TRUE); } for(af = ch->affected; af; af=af->next) if(af->type != SPELL_FLY) affect_modify(ch, af->location, (int)af->modifier, af->bitvector, TRUE); /* Make certain values are between 0..25, not < 0 and not > 25! */ i = ((!IS_PC(ch)) ? 25 :18); /* fuck polies */ GET_DEX(ch) = MAX(3,MIN(GET_DEX(ch), i)); GET_INT(ch) = MAX(3,MIN(GET_INT(ch), i)); GET_WIS(ch) = MAX(3,MIN(GET_WIS(ch), i)); GET_CON(ch) = MAX(3,MIN(GET_CON(ch), i)); GET_STR(ch) = MAX(3,GET_STR(ch)); if (!IS_PC(ch)) { GET_STR(ch) = MIN(GET_STR(ch), i); } else if(GET_RACE(ch) != RACE_OGRE) { if (GET_STR(ch) > 18) { GET_ADD(ch) = 100; GET_STR(ch) = 18; } } else { /* warning: I am counting on ChangeStrength() */ /* to be working for this to be safe :) */ GET_STR(ch) = MIN(22,GET_STR(ch)); }}
开发者ID:okeuday,项目名称:sillymud,代码行数:59,
示例12: os_listdirObject os_listdir() { Object list = list_new(10); Object path = arg_take_str_obj("listdir");#ifdef _WIN32 WIN32_FIND_DATA Find_file_data; Object _path = obj_add(path, string_new("//*.*")); HANDLE h_find = FindFirstFile(GET_STR(_path), &Find_file_data); if (h_find == INVALID_HANDLE_VALUE) { tm_raise("%s is not a directory", path); } do { if (strcmp(Find_file_data.cFileName, "..")==0 || strcmp(Find_file_data.cFileName, ".") == 0) { continue; } if (Find_file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // do nothing. } Object file = string_new(Find_file_data.cFileName); obj_append(list, file); } while (FindNextFile(h_find, &Find_file_data)); FindClose(h_find);#else tm_raise("listdir not implemented in posix.");#endif return list;}
开发者ID:xupingmao,项目名称:minipy,代码行数:26,
示例13: Java_com_sun_netstorage_samqfs_mgmt_fs_Host_getConfigJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Host_getConfig(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsName) { jobjectArray newArr; sqm_lst_t *hlst; jboolean isCopy; /* used by string macros */ char *cstr = GET_STR(fsName, isCopy); PTRACE(1, "jni:Host_getConfig(...,%s)", Str(cstr)); if (-1 == get_host_config(CTX, cstr, &hlst)) { REL_STR(fsName, cstr, isCopy); ThrowEx(env); return (NULL); } PTRACE(1, "jni:host config information obtained"); newArr = lst2jarray(env, hlst, BASEPKG"/fs/Host", host2Host); REL_STR(fsName, cstr, isCopy); free_list_of_host_info(hlst); PTRACE(1, "jni:Host_getConfig() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:25,
示例14: resource_loader_load_urlresource_p resource_loader_load_url(const char *url) { // DANGER: This is called from a thread other than GLThread! JNIEnv *env = NULL; native_shim *shim = get_native_thread_shim(&env); jobject instance = shim->instance; jclass type = shim->type; resource *result = NULL; result = (resource*)malloc(sizeof(resource)); jmethodID fetch_id = env->GetMethodID(type, "loadSourceFile", "(Ljava/lang/String;)Ljava/lang/String;"); jstring s = env->NewStringUTF(url); jstring str = (jstring)env->CallObjectMethod(instance, fetch_id, s); env->DeleteLocalRef(s); if (str == NULL) { result->text = NULL; result->mapped = false; } else { char *contents = NULL; GET_STR(env, str, contents); env->DeleteLocalRef(str); int len; if (contents == NULL) { len = 0; contents = strdup(""); } else { len = strlen(contents); } result->text = contents; result->size = len + 1; result->mapped = false; } return result;}
开发者ID:farleyknight,项目名称:native-android,代码行数:32,
示例15: handle_filestatic void handle_file( LWControl *ectl, void *edata ){ char a[ 24 ]; struct stat s; time_t timestamp; GET_STR( ectl, filename, sizeof( filename )); if ( filename[ 0 ] == 0 ) return; if ( fp ) fclose( fp ); if ( !( fp = fopen( filename, "rb" ))) { msgf->error( "Couldn't open", filename ); return; } stat( filename, &s ); filesize = s.st_size; timestamp = s.st_mtime; pos = 0; set_scroll(); SET_STR( ctl[ 11 ], itoa( filesize, a, 10 ), sizeof( a )); strftime( a, sizeof( a ), "%d %b %y %X", localtime( ×tamp )); SET_STR( ctl[ 2 ], a, strlen( a )); ctl[ 0 ]->draw( ctl[ 0 ], DR_REFRESH );}
开发者ID:DimondTheCat,项目名称:xray,代码行数:28,
示例16: Java_com_sun_netstorage_samqfs_mgmt_fs_Host_getSharedFSHostsJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Host_getSharedFSHosts(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsName, jint options) { jobjectArray newArr; sqm_lst_t *kvlst; jboolean isCopy; /* used by string macros */ char *cstr = GET_STR(fsName, isCopy); PTRACE(1, "jni:Host_getSharedFSHosts(...,%s)", Str(cstr)); if (-1 == get_shared_fs_hosts(CTX, cstr, options, &kvlst)) { REL_STR(fsName, cstr, isCopy); ThrowEx(env); return (NULL); } PTRACE(1, "jni:shared host information obtained"); newArr = lst2jarray(env, kvlst, "java/lang/String", charr2String); REL_STR(fsName, cstr, isCopy); lst_free_deep(kvlst); PTRACE(1, "jni:Host_getSharedFSHosts() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:25,
示例17: getCharStarFld/* * extract a char array from the Java String stored in the specified object * field and copy into a newly created buffer that must be freed by the caller */voidgetCharStarFld(JNIEnv *env, jclass cls, jobject obj, char *fieldname, char **buf) { jfieldID fid; jboolean isCopy; jstring s; char *cstr; if (NULL == obj) { PTRACE(1, "jni:getCharStarFld(...,%s,...):obj arg is null", fieldname); *buf = (char *)malloc(sizeof (char)); (*buf)[0] = '/0'; return; } fid = (*env)->GetFieldID(env, cls, fieldname, "Ljava/lang/String;"); if (NULL == fid) (*env)->ExceptionDescribe(env); s = (jstring)(*env)->GetObjectField(env, obj, fid); if (NULL == s) { *buf = (char *)malloc(sizeof (char)); (*buf)[0] = '/0'; } else { cstr = GET_STR(s, isCopy); *buf = strdup(cstr); REL_STR(s, cstr, isCopy); }}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:31,
示例18: Java_com_sun_netstorage_samqfs_mgmt_fs_Host_getAdvancedNetCfgJNIEXPORT jobjectArray JNICALLJava_com_sun_netstorage_samqfs_mgmt_fs_Host_getAdvancedNetCfg(JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsName) { jobjectArray newArr; sqm_lst_t *lst; jboolean isCopy; /* used by string macros */ char *cstr = GET_STR(fsName, isCopy); PTRACE(1, "jni:Host_getAdvancedNetCfg(...,%s)", Str(cstr)); if (-1 == get_advanced_network_cfg(CTX, cstr, &lst)) { REL_STR(fsName, cstr, isCopy); ThrowEx(env); return (NULL); } PTRACE(1, "jni:advanced net cfg information obtained"); newArr = lst2jarray(env, lst, "java/lang/String", charr2String); REL_STR(fsName, cstr, isCopy); lst_free_deep(lst); PTRACE(1, "jni:Host_getAdvancedNetCfg() done"); return (newArr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:26,
示例19: tm_load_module/** * @since 2016-11-20 */Object tm_load_module(Object file, Object code, Object name) { Object mod = module_new(file, name, code); Object fnc = func_new(mod, NONE_OBJECT, NULL); GET_FUNCTION(fnc)->code = (unsigned char*) GET_STR(code); GET_FUNCTION(fnc)->name = string_new("#main"); call_function(fnc); return GET_MODULE(mod)->globals;}
开发者ID:xupingmao,项目名称:minipy,代码行数:11,
示例20: write_mobile_especint write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd){ if (GET_ATTACK(mob) != 0) fprintf(fd, "BareHandAttack: %d/n", GET_ATTACK(mob)); if (GET_STR(mob) != 11) fprintf(fd, "Str: %d/n", GET_STR(mob)); if (GET_ADD(mob) != 0) fprintf(fd, "StrAdd: %d/n", GET_ADD(mob)); if (GET_DEX(mob) != 11) fprintf(fd, "Dex: %d/n", GET_DEX(mob)); if (GET_INT(mob) != 11) fprintf(fd, "Int: %d/n", GET_INT(mob)); if (GET_WIS(mob) != 11) fprintf(fd, "Wis: %d/n", GET_WIS(mob)); fputs("E/n", fd); return TRUE;}
开发者ID:matthewbode,项目名称:mg2,代码行数:17,
示例21: os_existsObject os_exists(){ Object _fname = arg_take_str_obj("exists"); char* fname = GET_STR(_fname); FILE*fp = fopen(fname, "rb"); if(fp == NULL) return tm->_FALSE; fclose(fp); return tm->_TRUE;}
开发者ID:xupingmao,项目名称:minipy,代码行数:8,
示例22: obj_cmpint obj_cmp(Object a, Object b) { if (TM_TYPE(a) == TM_TYPE(b)) { switch (TM_TYPE(a)) { case TYPE_NUM: { double diff = GET_NUM(a) - GET_NUM(b); if (diff > 0.0) { return 1; } else if (diff < 0.0) { return -1; } return 0; } case TYPE_STR: return strcmp(GET_STR(a), GET_STR(b)); } } tm_raise("obj_cmp: can not compare %o and %o", a, b); return 0;}
开发者ID:xupingmao,项目名称:minipy,代码行数:18,
示例23: device_infoconst char* device_info() { native_shim *shim = get_native_shim(); jmethodID method = shim->env->GetMethodID(shim->type, "getDeviceInfo", "()Ljava/lang/String;"); jstring result = (jstring) shim->env->CallObjectMethod(shim->instance, method); const char* str = NULL; GET_STR(shim->env, result, str); shim->env->DeleteLocalRef(result); return str;}
开发者ID:farleyknight,项目名称:native-android,代码行数:9,
示例24: mpfr_asprintfintmpfr_asprintf (char **pp, const char *fmt, ...){ int ret; GET_STR (ret, *pp, fmt); return ret;}
开发者ID:BrianGladman,项目名称:mpfr,代码行数:9,
示例25: device_global_idconst char* device_global_id() { native_shim *shim = get_native_shim(); JNIEnv *env = shim->env; jmethodID method = env->GetMethodID(shim->type, "getDeviceID", "()Ljava/lang/String;"); jstring result = (jstring) env->CallObjectMethod(shim->instance, method); const char* str = NULL; GET_STR(env, result, str); env->DeleteLocalRef(result); return str;}
开发者ID:farleyknight,项目名称:native-android,代码行数:10,
示例26: get_str2int get_str2(void **buf, int *len, char **value, size_t *n){ GET_STR_ARG_CHECK; uint16_t slen = 0; if (get_uint16(buf, len, &slen) < 0) return -2; GET_STR(slen);}
开发者ID:cheetah0216,项目名称:logdb,代码行数:10,
示例27: textbox_get_valueconst char* textbox_get_value(int id) { native_shim* shim = get_native_shim(); JNIEnv *env = shim->env; jmethodID method = env->GetMethodID(shim->type, "getTextBoxValue", "(I)Ljava/lang/String;"); jstring value = (jstring) env->CallObjectMethod(shim->instance, method, id); const char* str = NULL; GET_STR(env, value, str); env->DeleteLocalRef(value); return str;}
开发者ID:ChrisCinelli,项目名称:native-android,代码行数:11,
示例28: String2charr/* * a common type of j2c: converts a String to a char[] */void *String2charr(JNIEnv *env, jobject strObj) { jboolean isCopy; jstring s = (jstring)strObj; char *newstr, *cstr = GET_STR(s, isCopy); newstr = (char *)strdup(cstr); REL_STR(s, cstr, isCopy); return (newstr);}
开发者ID:BackupTheBerlios,项目名称:samqfs,代码行数:14,
注:本文中的GET_STR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GET_STRING函数代码示例 C++ GET_STATE函数代码示例 |