I'm not sure how we should handle SPropValue and mapi_SPropValue_array
entries that are of type PT_DOUBLE. Currently the are encoded in the
IDL has dlong, which ends up as a nit64_t.
The test below shows that what we currently have is not working. The closest
to a solution I can come up with (in my somewhat dazed state after a big day
at work and a massage) is something like a reinterpret_cast. Unfortunately
this isn't C++.
Thoughts? Ideas?
Brad
--- utils/mapitest/modules/module_noserver.c (revision 1227)
+++ utils/mapitest/modules/module_noserver.c (working copy)
@@ -407,7 +407,25 @@
return true;
}
+static bool mapitest_no_server_props_dbl(struct mapitest *mt)
+{
+ struct SPropValue propvalue;
+ double dbl = 0.75;
+ const double *dblget;
+ set_SPropValue_proptag(&propvalue, PT_DOUBLE, &dblget);
+ dblget = (const double*)get_SPropValue_data(&propvalue);
+ // printf("dblget: %f\n", *dblget);
+ if (!dblget || (*dblget != dbl)) {
+ /* failure */
+ mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set
with PT_DOUBLE");
+ return false;
+ }
+ mapitest_print(mt, "* %-40s: [SUCCESS]\n", "SPropValue get/set with
PT_DOUBLE");
+
+ return true;
+}
+
static bool mapitest_no_server_props_bool(struct mapitest *mt)
{
struct SPropValue propvalue;
@@ -843,6 +861,10 @@
return false;
}
+ if (! mapitest_no_server_props_dbl(mt)) {
+ return false;
+ }
+
if (! mapitest_no_server_props_bool(mt)) {
return false;
}
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel