sfcc 0.1.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +24 -0
- data/README.rdoc +16 -0
- data/ext/sfcc/cim_class.c +147 -58
- data/ext/sfcc/cim_class.h +1 -1
- data/ext/sfcc/cim_client.c +187 -198
- data/ext/sfcc/cim_client.h +1 -1
- data/ext/sfcc/cim_enumeration.c +109 -21
- data/ext/sfcc/cim_enumeration.h +1 -1
- data/ext/sfcc/cim_instance.c +70 -77
- data/ext/sfcc/cim_instance.h +1 -1
- data/ext/sfcc/cim_object_path.c +141 -122
- data/ext/sfcc/cim_object_path.h +1 -1
- data/ext/sfcc/cim_string.c +9 -13
- data/ext/sfcc/cim_string.h +1 -1
- data/ext/sfcc/extconf.rb +8 -4
- data/ext/sfcc/sfcc.c +163 -105
- data/ext/sfcc/sfcc.h +15 -40
- data/lib/sfcc.rb +75 -12
- data/lib/sfcc/version.rb +1 -1
- metadata +68 -95
data/ext/sfcc/cim_instance.h
CHANGED
data/ext/sfcc/cim_object_path.c
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
#include "cim_object_path.h"
|
3
3
|
|
4
4
|
static void
|
5
|
-
dealloc(
|
5
|
+
dealloc(CIMCObjectPath *op)
|
6
6
|
{
|
7
|
-
|
7
|
+
/* fprintf(stderr, "Sfcc_dealloc_object_path %p\n", op); */
|
8
|
+
op->ft->release(op);
|
8
9
|
}
|
9
10
|
|
10
11
|
/**
|
@@ -15,10 +16,10 @@ dealloc(CMPIObjectPath *object_path)
|
|
15
16
|
*/
|
16
17
|
static VALUE set_namespace(VALUE self, VALUE val)
|
17
18
|
{
|
18
|
-
|
19
|
-
|
20
|
-
Data_Get_Struct(self,
|
21
|
-
status = ptr->ft->setNameSpace(ptr,
|
19
|
+
CIMCObjectPath *ptr;
|
20
|
+
CIMCStatus status;
|
21
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
22
|
+
status = ptr->ft->setNameSpace(ptr, to_charptr(val));
|
22
23
|
if (!status.rc)
|
23
24
|
return val;
|
24
25
|
sfcc_rb_raise_if_error(status, "Can't set namespace");
|
@@ -33,10 +34,10 @@ static VALUE set_namespace(VALUE self, VALUE val)
|
|
33
34
|
*/
|
34
35
|
static VALUE namespace(VALUE self)
|
35
36
|
{
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
Data_Get_Struct(self,
|
37
|
+
CIMCObjectPath *ptr;
|
38
|
+
CIMCString *cimstr;
|
39
|
+
CIMCStatus status;
|
40
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
40
41
|
cimstr = ptr->ft->getNameSpace(ptr, &status);
|
41
42
|
if (!status.rc)
|
42
43
|
return CIMSTR_2_RUBYSTR(cimstr);
|
@@ -52,10 +53,10 @@ static VALUE namespace(VALUE self)
|
|
52
53
|
*/
|
53
54
|
static VALUE set_hostname(VALUE self, VALUE val)
|
54
55
|
{
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
status = ptr->ft->setHostname(ptr,
|
56
|
+
CIMCObjectPath *ptr;
|
57
|
+
CIMCStatus status;
|
58
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
59
|
+
status = ptr->ft->setHostname(ptr, to_charptr(val));
|
59
60
|
if (!status.rc)
|
60
61
|
return val;
|
61
62
|
sfcc_rb_raise_if_error(status, "Can't set hostname");
|
@@ -70,10 +71,10 @@ static VALUE set_hostname(VALUE self, VALUE val)
|
|
70
71
|
*/
|
71
72
|
static VALUE hostname(VALUE self)
|
72
73
|
{
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
Data_Get_Struct(self,
|
74
|
+
CIMCObjectPath *ptr;
|
75
|
+
CIMCString *cimstr;
|
76
|
+
CIMCStatus status;
|
77
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
77
78
|
cimstr = ptr->ft->getHostname(ptr, &status);
|
78
79
|
if (!status.rc)
|
79
80
|
return CIMSTR_2_RUBYSTR(cimstr);
|
@@ -83,28 +84,28 @@ static VALUE hostname(VALUE self)
|
|
83
84
|
|
84
85
|
/**
|
85
86
|
* call-seq:
|
86
|
-
*
|
87
|
+
* classname=(ns)
|
87
88
|
* Set/replace the class name component
|
88
89
|
*/
|
89
|
-
static VALUE
|
90
|
+
static VALUE set_classname(VALUE self, VALUE val)
|
90
91
|
{
|
91
|
-
|
92
|
-
Data_Get_Struct(self,
|
93
|
-
ptr->ft->setClassName(ptr,
|
92
|
+
CIMCObjectPath *ptr;
|
93
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
94
|
+
ptr->ft->setClassName(ptr, to_charptr(val));
|
94
95
|
return val;
|
95
96
|
}
|
96
97
|
|
97
98
|
/**
|
98
99
|
* call-seq:
|
99
|
-
*
|
100
|
+
* classname()
|
100
101
|
*
|
101
102
|
* Get the class name component
|
102
103
|
*/
|
103
|
-
static VALUE
|
104
|
+
static VALUE classname(VALUE self)
|
104
105
|
{
|
105
|
-
|
106
|
-
|
107
|
-
Data_Get_Struct(self,
|
106
|
+
CIMCObjectPath *ptr;
|
107
|
+
CIMCString *cimstr;
|
108
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
108
109
|
cimstr = ptr->ft->getClassName(ptr, NULL);
|
109
110
|
return CIMSTR_2_RUBYSTR(cimstr);
|
110
111
|
}
|
@@ -117,11 +118,11 @@ static VALUE class_name(VALUE self)
|
|
117
118
|
*/
|
118
119
|
static VALUE add_key(VALUE self, VALUE name, VALUE value)
|
119
120
|
{
|
120
|
-
|
121
|
-
|
122
|
-
Data_Get_Struct(self,
|
121
|
+
CIMCObjectPath *ptr;
|
122
|
+
CIMCData data;
|
123
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
123
124
|
data = sfcc_value_to_cimdata(value);
|
124
|
-
ptr->ft->addKey(ptr,
|
125
|
+
ptr->ft->addKey(ptr, to_charptr(name), &data.value, data.type);
|
125
126
|
return value;
|
126
127
|
}
|
127
128
|
|
@@ -133,15 +134,15 @@ static VALUE add_key(VALUE self, VALUE name, VALUE value)
|
|
133
134
|
*/
|
134
135
|
static VALUE key(VALUE self, VALUE name)
|
135
136
|
{
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
Data_Get_Struct(self,
|
140
|
-
data = ptr->ft->getKey(ptr,
|
137
|
+
CIMCObjectPath *ptr;
|
138
|
+
CIMCStatus status;
|
139
|
+
CIMCData data;
|
140
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
141
|
+
data = ptr->ft->getKey(ptr, to_charptr(name), &status);
|
141
142
|
if ( !status.rc )
|
142
143
|
return sfcc_cimdata_to_value(data);
|
143
144
|
|
144
|
-
sfcc_rb_raise_if_error(status, "Can't retrieve key '%s'",
|
145
|
+
sfcc_rb_raise_if_error(status, "Can't retrieve key '%s'", to_charptr(name));
|
145
146
|
return Qnil;
|
146
147
|
}
|
147
148
|
|
@@ -157,13 +158,13 @@ static VALUE key(VALUE self, VALUE name)
|
|
157
158
|
*/
|
158
159
|
static VALUE each_key(VALUE self)
|
159
160
|
{
|
160
|
-
|
161
|
-
|
161
|
+
CIMCObjectPath *ptr;
|
162
|
+
CIMCStatus status;
|
162
163
|
int k=0;
|
163
164
|
int num_props=0;
|
164
|
-
|
165
|
-
|
166
|
-
Data_Get_Struct(self,
|
165
|
+
CIMCString *key_name = NULL;
|
166
|
+
CIMCData data;
|
167
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
167
168
|
|
168
169
|
num_props = ptr->ft->getKeyCount(ptr, &status);
|
169
170
|
if (!status.rc) {
|
@@ -174,7 +175,7 @@ static VALUE each_key(VALUE self)
|
|
174
175
|
}
|
175
176
|
else {
|
176
177
|
sfcc_rb_raise_if_error(status, "Can't retrieve key #%d", k);
|
177
|
-
}
|
178
|
+
}
|
178
179
|
if (key_name) CMRelease(key_name);
|
179
180
|
}
|
180
181
|
}
|
@@ -192,8 +193,8 @@ static VALUE each_key(VALUE self)
|
|
192
193
|
*/
|
193
194
|
static VALUE key_count(VALUE self)
|
194
195
|
{
|
195
|
-
|
196
|
-
Data_Get_Struct(self,
|
196
|
+
CIMCObjectPath *ptr;
|
197
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
197
198
|
return UINT2NUM(ptr->ft->getKeyCount(ptr, NULL));
|
198
199
|
}
|
199
200
|
|
@@ -206,12 +207,12 @@ static VALUE key_count(VALUE self)
|
|
206
207
|
*/
|
207
208
|
static VALUE set_namespace_from(VALUE self, VALUE object_path)
|
208
209
|
{
|
209
|
-
|
210
|
-
|
211
|
-
|
210
|
+
CIMCObjectPath *ptr;
|
211
|
+
CIMCObjectPath *src;
|
212
|
+
CIMCStatus status;
|
212
213
|
|
213
|
-
Data_Get_Struct(self,
|
214
|
-
Data_Get_Struct(object_path,
|
214
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
215
|
+
Data_Get_Struct(object_path, CIMCObjectPath, src);
|
215
216
|
|
216
217
|
status = ptr->ft->setNameSpaceFromObjectPath(ptr, src);
|
217
218
|
|
@@ -231,14 +232,16 @@ static VALUE set_namespace_from(VALUE self, VALUE object_path)
|
|
231
232
|
*/
|
232
233
|
static VALUE set_host_and_namespace_from(VALUE self, VALUE object_path)
|
233
234
|
{
|
234
|
-
|
235
|
-
|
236
|
-
|
235
|
+
CIMCObjectPath *ptr;
|
236
|
+
CIMCObjectPath *src;
|
237
|
+
CIMCStatus status;
|
237
238
|
|
238
|
-
Data_Get_Struct(self,
|
239
|
-
Data_Get_Struct(object_path,
|
239
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
240
|
+
Data_Get_Struct(object_path, CIMCObjectPath, src);
|
240
241
|
|
241
|
-
|
242
|
+
if (ptr->ft->setHostAndNameSpaceFromObjectPath) { /* might be missing in sfcc/backend/cimxml/objectpath.c */
|
243
|
+
status = ptr->ft->setHostAndNameSpaceFromObjectPath(ptr, src);
|
244
|
+
}
|
242
245
|
|
243
246
|
if (!status.rc)
|
244
247
|
return self;
|
@@ -255,16 +258,21 @@ static VALUE set_host_and_namespace_from(VALUE self, VALUE object_path)
|
|
255
258
|
*/
|
256
259
|
static VALUE class_qualifier(VALUE self, VALUE qualifier_name)
|
257
260
|
{
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
memset(&status, 0, sizeof(
|
262
|
-
Data_Get_Struct(self,
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
261
|
+
CIMCObjectPath *ptr;
|
262
|
+
CIMCStatus status;
|
263
|
+
CIMCData data;
|
264
|
+
memset(&status, 0, sizeof(CIMCStatus));
|
265
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
266
|
+
if (ptr->ft->getClassQualifier) { /* might be missing in sfcc/backend/cimxml/objectpath.c */
|
267
|
+
data = ptr->ft->getClassQualifier(ptr, to_charptr(qualifier_name), &status);
|
268
|
+
if ( !status.rc )
|
269
|
+
return sfcc_cimdata_to_value(data);
|
270
|
+
}
|
271
|
+
else {
|
272
|
+
status.rc = CIMC_RC_ERR_NOT_SUPPORTED;
|
273
|
+
status.msg = NULL;
|
274
|
+
}
|
275
|
+
sfcc_rb_raise_if_error(status, "Can't retrieve class qualifier '%s'", to_charptr(qualifier_name));
|
268
276
|
return Qnil;
|
269
277
|
}
|
270
278
|
|
@@ -276,17 +284,22 @@ static VALUE class_qualifier(VALUE self, VALUE qualifier_name)
|
|
276
284
|
*/
|
277
285
|
static VALUE property_qualifier(VALUE self, VALUE property_name, VALUE qualifier_name)
|
278
286
|
{
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
memset(&status, 0, sizeof(
|
283
|
-
Data_Get_Struct(self,
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
287
|
+
CIMCObjectPath *ptr;
|
288
|
+
CIMCStatus status;
|
289
|
+
CIMCData data;
|
290
|
+
memset(&status, 0, sizeof(CIMCStatus));
|
291
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
292
|
+
if (ptr->ft->getPropertyQualifier) { /* might be missing in sfcc/backend/cimxml/objectpath.c */
|
293
|
+
data = ptr->ft->getPropertyQualifier(ptr, to_charptr(property_name),
|
294
|
+
to_charptr(qualifier_name), &status);
|
295
|
+
if ( !status.rc )
|
296
|
+
return sfcc_cimdata_to_value(data);
|
297
|
+
}
|
298
|
+
else {
|
299
|
+
status.rc = CIMC_RC_ERR_NOT_SUPPORTED;
|
300
|
+
status.msg = NULL;
|
301
|
+
}
|
302
|
+
sfcc_rb_raise_if_error(status, "Can't retrieve property qualifier '%s' for property '%s'", to_charptr(qualifier_name), to_charptr(property_name));
|
290
303
|
return Qnil;
|
291
304
|
}
|
292
305
|
|
@@ -298,17 +311,22 @@ static VALUE property_qualifier(VALUE self, VALUE property_name, VALUE qualifier
|
|
298
311
|
*/
|
299
312
|
static VALUE method_qualifier(VALUE self, VALUE method_name, VALUE qualifier_name)
|
300
313
|
{
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
memset(&status, 0, sizeof(
|
305
|
-
Data_Get_Struct(self,
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
314
|
+
CIMCObjectPath *ptr;
|
315
|
+
CIMCStatus status;
|
316
|
+
CIMCData data;
|
317
|
+
memset(&status, 0, sizeof(CIMCStatus));
|
318
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
319
|
+
if (ptr->ft->getMethodQualifier) { /* might be missing in sfcc/backend/cimxml/objectpath.c */
|
320
|
+
data = ptr->ft->getMethodQualifier(ptr, to_charptr(method_name),
|
321
|
+
to_charptr(qualifier_name), &status);
|
322
|
+
if ( !status.rc )
|
323
|
+
return sfcc_cimdata_to_value(data);
|
324
|
+
}
|
325
|
+
else {
|
326
|
+
status.rc = CIMC_RC_ERR_NOT_SUPPORTED;
|
327
|
+
status.msg = NULL;
|
328
|
+
}
|
329
|
+
sfcc_rb_raise_if_error(status, "Can't retrieve method qualifier '%s' for method '%s'", to_charptr(qualifier_name), to_charptr(method_name));
|
312
330
|
return Qnil;
|
313
331
|
}
|
314
332
|
|
@@ -319,23 +337,28 @@ static VALUE method_qualifier(VALUE self, VALUE method_name, VALUE qualifier_nam
|
|
319
337
|
* Get parameter qualifier value
|
320
338
|
*/
|
321
339
|
static VALUE parameter_qualifier(VALUE self,
|
322
|
-
VALUE method_name,
|
340
|
+
VALUE method_name,
|
323
341
|
VALUE parameter_name,
|
324
342
|
VALUE qualifier_name)
|
325
343
|
{
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
memset(&status, 0, sizeof(
|
330
|
-
Data_Get_Struct(self,
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
344
|
+
CIMCObjectPath *ptr;
|
345
|
+
CIMCStatus status;
|
346
|
+
CIMCData data;
|
347
|
+
memset(&status, 0, sizeof(CIMCStatus));
|
348
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
349
|
+
if (ptr->ft->getParameterQualifier) { /* might be missing in sfcc/backend/cimxml/objectpath.c */
|
350
|
+
data = ptr->ft->getParameterQualifier(ptr,
|
351
|
+
to_charptr(method_name),
|
352
|
+
to_charptr(parameter_name),
|
353
|
+
to_charptr(qualifier_name), &status);
|
354
|
+
if ( !status.rc )
|
355
|
+
return sfcc_cimdata_to_value(data);
|
356
|
+
}
|
357
|
+
else {
|
358
|
+
status.rc = CIMC_RC_ERR_NOT_SUPPORTED;
|
359
|
+
status.msg = NULL;
|
360
|
+
}
|
361
|
+
sfcc_rb_raise_if_error(status, "Can't retrieve parameter qualifier '%s' for '%s'/'%s'", to_charptr(qualifier_name), to_charptr(method_name), to_charptr(parameter_name));
|
339
362
|
return Qnil;
|
340
363
|
}
|
341
364
|
|
@@ -346,11 +369,14 @@ static VALUE parameter_qualifier(VALUE self,
|
|
346
369
|
*/
|
347
370
|
static VALUE to_s(VALUE self)
|
348
371
|
{
|
349
|
-
|
350
|
-
|
351
|
-
|
372
|
+
VALUE ret;
|
373
|
+
CIMCObjectPath *ptr;
|
374
|
+
CIMCString *cimstr;
|
375
|
+
Data_Get_Struct(self, CIMCObjectPath, ptr);
|
352
376
|
cimstr = ptr->ft->toString(ptr, NULL);
|
353
|
-
|
377
|
+
ret = CIMSTR_2_RUBYSTR(cimstr);
|
378
|
+
CMRelease(cimstr);
|
379
|
+
return ret;
|
354
380
|
}
|
355
381
|
|
356
382
|
/**
|
@@ -365,30 +391,23 @@ static VALUE new(int argc, VALUE *argv, VALUE self)
|
|
365
391
|
VALUE namespace;
|
366
392
|
VALUE class_name;
|
367
393
|
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
memset(&status, 0, sizeof(CMPIStatus));
|
394
|
+
CIMCStatus status;
|
395
|
+
CIMCObjectPath *ptr;
|
396
|
+
memset(&status, 0, sizeof(CIMCStatus));
|
372
397
|
|
373
398
|
rb_scan_args(argc, argv, "11", &namespace, &class_name);
|
374
399
|
|
375
|
-
ptr =
|
376
|
-
NIL_P(class_name) ? NULL : StringValuePtr(class_name),
|
377
|
-
&status);
|
378
|
-
|
379
|
-
newop = ptr->ft->clone(ptr, &status);
|
380
|
-
ptr->ft->release(ptr);
|
400
|
+
ptr = cimcEnv->ft->newObjectPath(cimcEnv, to_charptr(namespace), to_charptr(class_name), &status);
|
381
401
|
|
382
402
|
if (!status.rc)
|
383
|
-
return Sfcc_wrap_cim_object_path(
|
403
|
+
return Sfcc_wrap_cim_object_path(ptr);
|
384
404
|
sfcc_rb_raise_if_error(status, "Can't create object path");
|
385
405
|
return Qnil;
|
386
406
|
}
|
387
407
|
|
388
408
|
VALUE
|
389
|
-
Sfcc_wrap_cim_object_path(
|
409
|
+
Sfcc_wrap_cim_object_path(CIMCObjectPath *object_path)
|
390
410
|
{
|
391
|
-
SFCC_INC_REFCOUNT(object_path);
|
392
411
|
return Data_Wrap_Struct(cSfccCimObjectPath, NULL, dealloc, object_path);
|
393
412
|
}
|
394
413
|
|
@@ -409,8 +428,8 @@ void init_cim_object_path()
|
|
409
428
|
rb_define_method(klass, "namespace", namespace, 0);
|
410
429
|
rb_define_method(klass, "hostname=", set_hostname, 1);
|
411
430
|
rb_define_method(klass, "hostname", hostname, 0);
|
412
|
-
rb_define_method(klass, "
|
413
|
-
rb_define_method(klass, "
|
431
|
+
rb_define_method(klass, "classname=", set_classname, 1);
|
432
|
+
rb_define_method(klass, "classname", classname, 0);
|
414
433
|
rb_define_method(klass, "add_key", add_key, 2);
|
415
434
|
rb_define_method(klass, "key", key, 1);
|
416
435
|
rb_define_method(klass, "each_key", each_key, 0);
|
data/ext/sfcc/cim_object_path.h
CHANGED
data/ext/sfcc/cim_string.c
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
#include "cim_string.h"
|
2
2
|
|
3
3
|
static void
|
4
|
-
dealloc(
|
4
|
+
dealloc(CIMCString *string)
|
5
5
|
{
|
6
|
-
|
6
|
+
/* fprintf(stderr, "dealloc(CIMCString %p\n", string); */
|
7
|
+
string->ft->release(string);
|
7
8
|
}
|
8
9
|
|
9
10
|
/**
|
@@ -13,9 +14,9 @@ dealloc(CMPIString *string)
|
|
13
14
|
*/
|
14
15
|
static VALUE to_s(VALUE self)
|
15
16
|
{
|
16
|
-
|
17
|
+
CIMCString *ptr = NULL;
|
17
18
|
char *str = NULL;
|
18
|
-
Data_Get_Struct(self,
|
19
|
+
Data_Get_Struct(self, CIMCString, ptr);
|
19
20
|
str = ptr->ft->getCharPtr(ptr, NULL);
|
20
21
|
return str ? rb_str_new2(str) : Qnil;
|
21
22
|
}
|
@@ -28,22 +29,17 @@ static VALUE to_s(VALUE self)
|
|
28
29
|
*/
|
29
30
|
static VALUE new(VALUE klass, VALUE value)
|
30
31
|
{
|
31
|
-
|
32
|
-
|
33
|
-
CMPIString *ptr = newCMPIString(StringValuePtr(value),
|
34
|
-
&status);
|
35
|
-
newstr = ptr->ft->clone(ptr, &status);
|
36
|
-
ptr->ft->release(ptr);
|
32
|
+
CIMCStatus status;
|
33
|
+
CIMCString *ptr = cimcEnv->ft->newString(cimcEnv, to_charptr(value), &status);
|
37
34
|
if (!status.rc)
|
38
|
-
return Sfcc_wrap_cim_string(
|
35
|
+
return Sfcc_wrap_cim_string(ptr);
|
39
36
|
sfcc_rb_raise_if_error(status, "Can't create CIM string");
|
40
37
|
return Qnil;
|
41
38
|
}
|
42
39
|
|
43
40
|
VALUE
|
44
|
-
Sfcc_wrap_cim_string(
|
41
|
+
Sfcc_wrap_cim_string(CIMCString *string)
|
45
42
|
{
|
46
|
-
SFCC_INC_REFCOUNT(string);
|
47
43
|
return Data_Wrap_Struct(cSfccCimString, NULL, dealloc, string);
|
48
44
|
}
|
49
45
|
|