Project

Profile

Help

Revision 6304fb8b

Added by O'Neil Delpratt 5 months ago

Saxon/C bug fixes and development work

View differences:

latest10/hec/Saxon.C.API/XdmAtomicValue.cpp
29 29
		return valType.c_str();	
30 30
	}
31 31
	
32
	if(proc != NULL) {
32
	if(proc != nullptr) {
33 33
		jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils");
34 34
		jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getPrimitiveTypeName",
35 35
					"(Lnet/sf/saxon/s9api/XdmAtomicValue;)Ljava/lang/String;");
......
41 41
		jstring result = (jstring)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID,value->xdmvalue));
42 42
		if(result) {
43 43
			const char * stri = SaxonProcessor::sxn_environ->env->GetStringUTFChars(result,
44
					NULL);
44
					nullptr);
45 45
		
46 46
		//SaxonProcessor::sxn_environ->env->DeleteLocalRef(result);
47 47
			valType = std::string(stri);
......
63 63
				<< " not found\n" << std::endl;
64 64
			return false;
65 65
		} else {
66
			jboolean result = (jboolean)(SaxonProcessor::sxn_environ->env->CallBooleanMethod(value->xdmvalue, bmID));
66
			jboolean result = (jboolean)(SaxonProcessor::sxn_environ->env->CallBooleanMethod(value, bmID));
67 67
			if(result) {
68 68
				return (bool)result;
69 69
			}
......
81 81
				<< " not found\n" << std::endl;
82 82
			return 0;
83 83
		} else {
84
			jdouble result = (jdouble)(SaxonProcessor::sxn_environ->env->CallDoubleMethod(value->xdmvalue, bmID));
84
			jdouble result = (jdouble)(SaxonProcessor::sxn_environ->env->CallDoubleMethod(value, bmID));
85 85
			if(result) {
86 86
				return (double)result;
87 87
			}
88
//checkForException(*(SaxonProcessor::sxn_environ), NULL);
88
//checkForException(*(SaxonProcessor::sxn_environ), nullptr);
89 89
		}
90 90

  
91 91
	return 0;
......
107 107
				<< " not found\n" << std::endl;
108 108
			return 0;
109 109
		} else {
110
			jlong result = (jlong)(SaxonProcessor::sxn_environ->env->CallObjectMethod(value->xdmvalue, bmID));
110
			jlong result = (jlong)(SaxonProcessor::sxn_environ->env->CallObjectMethod(value, bmID));
111 111
			if(result) {
112 112
				return (long)result;
113 113
			}

Also available in: Unified diff