| CODENOTIFIER | HelpYou are not signed inSign in |
Project: RJB
Revision: 75
Author: arton
Date: 14 Aug 2008 06:03:52
Changes:import Ittay Dror' s AIX patch
Files:| ... | ...@@ -109,7 +109,6 @@ | |
| 109 | 109 | (*jenv)->ExceptionDescribe(jenv); |
| 110 | 110 | } |
| 111 | 111 | (*jenv)->ExceptionClear(jenv); |
| 112 | // if (t) | |
| 113 | 112 | if(1) |
| 114 | 113 | { |
| 115 | 114 | char* msg = "unknown exception"; |
| ... | ...@@ -115,7 +115,7 @@ | |
| 115 | 115 | PRM_SHORT, |
| 116 | 116 | PRM_BYTE, |
| 117 | 117 | PRM_FLOAT, |
| 118 | // | |
| 118 | /* */ | |
| 119 | 119 | PRM_LAST |
| 120 | 120 | }; |
| 121 | 121 | |
| ... | ...@@ -253,7 +253,7 @@ | |
| 253 | 253 | VALUE clsname; |
| 254 | 254 | VALUE v; |
| 255 | 255 | struct jv_data* ptr; |
| 256 | // object to ruby | |
| 256 | /* object to ruby */ | |
| 257 | 257 | if (!val.l) return Qnil; |
| 258 | 258 | klass = (*jenv)->GetObjectClass(jenv, val.l); |
| 259 | 259 | |
| ... | ...@@ -715,7 +715,7 @@ | |
| 715 | 715 | Data_Get_Struct(val, struct jvi_data, ptr); |
| 716 | 716 | if ((*jenv)->IsInstanceOf(jenv, ptr->obj, j_string)) |
| 717 | 717 | { |
| 718 | return; // never delete at this time | |
| 718 | return; /* never delete at this time */ | |
| 719 | 719 | } |
| 720 | 720 | } |
| 721 | 721 | } |
| ... | ...@@ -739,7 +739,7 @@ | |
| 739 | 739 | } |
| 740 | 740 | else if (NIL_P(val)) |
| 741 | 741 | { |
| 742 | // no-op | |
| 742 | /* no-op */ | |
| 743 | 743 | } |
| 744 | 744 | else if (FIXNUM_P(val)) |
| 745 | 745 | { |
| ... | ...@@ -765,7 +765,7 @@ | |
| 765 | 765 | case T_DATA: |
| 766 | 766 | if (RBASIC(val)->klass == rjbi || RBASIC(val)->klass == rjb) |
| 767 | 767 | { |
| 768 | // TODO: check instanceof (class (in psig) ) | |
| 768 | /* TODO: check instanceof (class (in psig) ) */ | |
| 769 | 769 | struct jvi_data* ptr; |
| 770 | 770 | Data_Get_Struct(val, struct jvi_data, ptr); |
| 771 | 771 | jv->l = ptr->obj; |
| ... | ...@@ -826,7 +826,7 @@ | |
| 826 | 826 | int i; |
| 827 | 827 | int len = RARRAY_LEN(v); |
| 828 | 828 | VALUE* p = RARRAY_PTR(v); |
| 829 | // check all fixnum (overflow is permit) | |
| 829 | /* check all fixnum (overflow is permit) */ | |
| 830 | 830 | for (i = 0; i < len; i++) |
| 831 | 831 | { |
| 832 | 832 | if (!FIXNUM_P(*p++)) |
| ... | ...@@ -1093,7 +1093,7 @@ | |
| 1093 | 1093 | jarray ja = NULL; |
| 1094 | 1094 | if (NIL_P(val)) |
| 1095 | 1095 | { |
| 1096 | // no-op, null for an array | |
| 1096 | /* no-op, null for an array */ | |
| 1097 | 1097 | } |
| 1098 | 1098 | else if (*(psig + 1) == '[') |
| 1099 | 1099 | { |
| ... | ...@@ -1376,7 +1376,7 @@ | |
| 1376 | 1376 | (*jenv)->DeleteLocalRef(jenv, cls); |
| 1377 | 1377 | result->static_method = static_method; |
| 1378 | 1378 | register_methodinfo(result, tbl); |
| 1379 | // create method alias | |
| 1379 | /* create method alias */ | |
| 1380 | 1380 | pm = NULL; |
| 1381 | 1381 | if (strlen(rname) > 3 |
| 1382 | 1382 | && (*rname == 'g' || *rname == 's') && *(rname + 1) == 'e' && *(rname + 2) == 't') |
| ... | ...@@ -1539,7 +1539,7 @@ | |
| 1539 | 1539 | char sigs[256]; |
| 1540 | 1540 | char* pname; |
| 1541 | 1541 | |
| 1542 | // constants make define directly in the ruby object | |
| 1542 | /* constants make define directly in the ruby object */ | |
| 1543 | 1543 | cls = (*jenv)->CallObjectMethod(jenv, f, field_getType); |
| 1544 | 1544 | rjb_check_exception(jenv, 0); |
| 1545 | 1545 | iv = 0; |
| ... | ...@@ -1991,7 +1991,7 @@ | |
| 1991 | 1991 | case T_DATA: |
| 1992 | 1992 | if (RBASIC(v)->klass == rjbi && pcls) |
| 1993 | 1993 | { |
| 1994 | // imported object | |
| 1994 | /* imported object */ | |
| 1995 | 1995 | jclass cls; |
| 1996 | 1996 | struct jvi_data* ptr; |
| 1997 | 1997 | int result = 0; |
| ... | ...@@ -2005,9 +2005,9 @@ | |
| 2005 | 2005 | } |
| 2006 | 2006 | return result; |
| 2007 | 2007 | } |
| 2008 | // fall down to the next case | |
| 2008 | /* fall down to the next case */ | |
| 2009 | 2009 | case T_OBJECT: |
| 2010 | // fall down to the next case | |
| 2010 | /* fall down to the next case */ | |
| 2011 | 2011 | default: |
| 2012 | 2012 | if (pcls || *p == '[') |
| 2013 | 2013 | { |
| ... | ...@@ -2571,7 +2571,7 @@ | |
| 2571 | 2571 | setter(jenv, pf, ptr, *argv); |
| 2572 | 2572 | return ret; |
| 2573 | 2573 | } |
| 2574 | // fall through for the setter alias name | |
| 2574 | /* fall through for the setter alias name */ | |
| 2575 | 2575 | } |
| 2576 | 2576 | if (st_lookup(ptr->methods, rmid, (st_data_t*)&pm)) |
| 2577 | 2577 | { |
| ... | ...@@ -2828,7 +2828,7 @@ | |
| 2828 | 2828 | *(argv + 2) = argc - 3; |
| 2829 | 2829 | result = rb_protect(safe_funcall, (VALUE)argv, &sstat); |
| 2830 | 2830 | rv2jobject(jenv, result, &j, NULL, 0); |
| 2831 | // I can't delete this object... | |
| 2831 | /* I can't delete this object... */ | |
| 2832 | 2832 | break; |
| 2833 | 2833 | } |
| 2834 | 2834 | } |
| ... | ...@@ -50,6 +50,9 @@ | |
| 50 | 50 | #define HOME_NAME "/Home" |
| 51 | 51 | #define HOME_NAME_LEN strlen(HOME_NAME) |
| 52 | 52 | #define DEFAULT_HOME "/System/Library/Frameworks/JavaVM.framework" |
| 53 | #elif defined(_AIX) | |
| 54 | #define ARCH "ppc" | |
| 55 | #define JVM_TYPE "j9vm" | |
| 53 | 56 | #else /* defined(_WIN32) || defined(__CYGWIN__) */ |
| 54 | 57 | #if defined(__sparc_v9__) |
| 55 | 58 | #define ARCH "sparcv9" |
| ... | ...@@ -151,7 +154,7 @@ | |
| 151 | 154 | |
| 152 | 155 | jvmdll = rb_funcall(rb_const_get(rb_cObject, rb_intern("DL")), rb_intern("dlopen"), 1, rb_str_new2(libpath)); |
| 153 | 156 | |
| 154 | //get function pointers of JNI | |
| 157 | /* get function pointers of JNI */ | |
| 155 | 158 | #if RJB_RUBY_VERSION_CODE < 190 |
| 156 | 159 | getdefaultjavavminitargsfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2("JNI_GetDefaultJavaVMInitArgs"), rb_str_new2("IP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0); |
| 157 | 160 | createjavavmfunc = rb_funcall(rb_funcall(rb_funcall(jvmdll, rb_intern("[]"), 2, rb_str_new2("JNI_CreateJavaVM"), rb_str_new2("IPPP")), rb_intern("to_ptr"), 0), rb_intern("to_i"), 0); |