node-gtk 0.8.1 → 0.11.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.
package/src/function.h CHANGED
@@ -16,7 +16,7 @@ using v8::String;
16
16
  namespace GNodeJS {
17
17
 
18
18
  enum ParameterType {
19
- NORMAL, ARRAY, SKIP, CALLBACK
19
+ kNORMAL, kARRAY, kSKIP, kCALLBACK
20
20
  };
21
21
 
22
22
  struct Parameter {
@@ -58,7 +58,6 @@ void FunctionInvoker (const Nan::FunctionCallbackInfo<Value> &info);
58
58
  void FunctionDestroyed (const v8::WeakCallbackInfo<FunctionInfo> &data);
59
59
 
60
60
  Local<Function> MakeFunction (GIBaseInfo *base_info);
61
- MaybeLocal<Function> MakeVirtualFunction(GIBaseInfo *info, GType implementor);
62
61
 
63
62
 
64
63
  };
package/src/gi.cc CHANGED
@@ -1,4 +1,4 @@
1
- #include <gobject-introspection-1.0/girepository.h>
1
+ #include <girepository.h>
2
2
  #include <node.h>
3
3
  #include <nan.h>
4
4
 
@@ -168,23 +168,6 @@ NAN_METHOD(MakeFunction) {
168
168
  info.GetReturnValue().Set(fn);
169
169
  }
170
170
 
171
- NAN_METHOD(MakeVirtualFunction) {
172
- if (info.Length() < 2 || !info[0]->IsObject() || !info[1]->IsNumber()) {
173
- Nan::ThrowTypeError("Incorrect arguments. Expecting (GIBaseInfo, GType)");
174
- return;
175
- }
176
-
177
- BaseInfo gi_info(info[0]);
178
- GType implementor = (gulong) Nan::To<int64_t> (info[1]).ToChecked();
179
-
180
- MaybeLocal<Function> maybeFn = GNodeJS::MakeVirtualFunction(*gi_info, implementor);
181
-
182
- if (maybeFn.IsEmpty())
183
- return;
184
-
185
- info.GetReturnValue().Set(maybeFn.ToLocalChecked());
186
- }
187
-
188
171
  NAN_METHOD(MakeObjectClass) {
189
172
  BaseInfo gi_info(info[0]);
190
173
  auto klass = GNodeJS::MakeClass(*gi_info);
@@ -362,23 +345,22 @@ NAN_METHOD(RegisterVFunc) {
362
345
  void InitModule(Local<Object> exports, Local<Value> module, void *priv) {
363
346
  GNodeJS::AsyncCallEnvironment::Initialize();
364
347
 
365
- NAN_EXPORT(exports, Bootstrap);
366
- NAN_EXPORT(exports, GetModuleCache);
367
- NAN_EXPORT(exports, GetBaseClass);
368
- NAN_EXPORT(exports, GetTypeSize);
369
- NAN_EXPORT(exports, GetConstantValue);
370
- NAN_EXPORT(exports, MakeBoxedClass);
371
- NAN_EXPORT(exports, MakeObjectClass);
372
- NAN_EXPORT(exports, MakeFunction);
373
- NAN_EXPORT(exports, MakeVirtualFunction);
374
- NAN_EXPORT(exports, StructFieldGetter);
375
- NAN_EXPORT(exports, StructFieldSetter);
376
- NAN_EXPORT(exports, ObjectPropertyGetter);
377
- NAN_EXPORT(exports, ObjectPropertySetter);
378
- NAN_EXPORT(exports, StartLoop);
379
- NAN_EXPORT(exports, GetLoopStack);
380
- NAN_EXPORT(exports, RegisterClass);
381
- NAN_EXPORT(exports, RegisterVFunc);
348
+ Nan::Export(exports, "Bootstrap", Bootstrap);
349
+ Nan::Export(exports, "GetModuleCache", GetModuleCache);
350
+ Nan::Export(exports, "GetBaseClass", GetBaseClass);
351
+ Nan::Export(exports, "GetTypeSize", GetTypeSize);
352
+ Nan::Export(exports, "GetConstantValue", GetConstantValue);
353
+ Nan::Export(exports, "MakeBoxedClass", MakeBoxedClass);
354
+ Nan::Export(exports, "MakeObjectClass", MakeObjectClass);
355
+ Nan::Export(exports, "MakeFunction", MakeFunction);
356
+ Nan::Export(exports, "StructFieldGetter", StructFieldGetter);
357
+ Nan::Export(exports, "StructFieldSetter", StructFieldSetter);
358
+ Nan::Export(exports, "ObjectPropertyGetter", ObjectPropertyGetter);
359
+ Nan::Export(exports, "ObjectPropertySetter", ObjectPropertySetter);
360
+ Nan::Export(exports, "StartLoop", StartLoop);
361
+ Nan::Export(exports, "GetLoopStack", GetLoopStack);
362
+ Nan::Export(exports, "RegisterClass", RegisterClass);
363
+ Nan::Export(exports, "RegisterVFunc", RegisterVFunc);
382
364
 
383
365
  Nan::Set(exports, UTF8("System"), GNodeJS::System::GetModule());
384
366
  Nan::Set(exports, UTF8("Cairo"), GNodeJS::Cairo::GetModule());
package/src/gobject.cc CHANGED
@@ -87,7 +87,11 @@ static GObject* CreateGObjectFromObject(GType gtype, Local<Value> object) {
87
87
 
88
88
  out:
89
89
  g_strfreev ((gchar**) names);
90
+
91
+ for (int i = 0; i < n_properties; i++)
92
+ g_value_unset(&values[i]);
90
93
  g_free (values);
94
+
91
95
  g_type_class_unref (klass);
92
96
 
93
97
  return gobject;
@@ -346,7 +350,7 @@ NAN_METHOD(SignalConnect) {
346
350
  guint signalId;
347
351
  GQuark detail;
348
352
  GClosure *gclosure;
349
- ulong handler_id;
353
+ gulong handler_id;
350
354
 
351
355
  const char *signalName = *Nan::Utf8String (TO_STRING (info[0]));
352
356
  if (!g_signal_parse_name(signalName, gtype, &signalId, &detail, FALSE)) {
@@ -386,7 +390,7 @@ NAN_METHOD(SignalDisconnect) {
386
390
  }
387
391
 
388
392
  gpointer instance = static_cast<gpointer>(gobject);
389
- ulong handler_id = TO_LONG (info[0]);
393
+ gulong handler_id = TO_LONG (info[0]);
390
394
  g_signal_handler_disconnect (instance, handler_id);
391
395
 
392
396
  info.GetReturnValue().Set((double)handler_id);
@@ -443,7 +447,7 @@ NAN_METHOD(SignalEmit) {
443
447
  g_value_set_object(&args[0], gobject);
444
448
 
445
449
  failed = false;
446
- for (uint i = 0; i < signal_query.n_params; i++) {
450
+ for (guint i = 0; i < signal_query.n_params; i++) {
447
451
  GValue *gvalue = &args[i + 1];
448
452
 
449
453
  g_value_init(gvalue, signal_query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
@@ -466,7 +470,7 @@ NAN_METHOD(SignalEmit) {
466
470
  }
467
471
  }
468
472
 
469
- for (uint i = 0; i < argc; i++) {
473
+ for (guint i = 0; i < argc; i++) {
470
474
  g_value_unset(&args[i]);
471
475
  }
472
476
  }
@@ -486,7 +490,7 @@ NAN_METHOD(GObjectToString) {
486
490
  char *className = *Nan::Utf8String(self->GetConstructorName());
487
491
  void *address = self->GetAlignedPointerFromInternalField(0);
488
492
 
489
- char *str = g_strdup_printf("[%s:%s %#zx]", typeName, className, (unsigned long)address);
493
+ char *str = g_strdup_printf("[%s:%s %#zx]", typeName, className, (size_t)address);
490
494
 
491
495
  info.GetReturnValue().Set(UTF8(str));
492
496
  g_free(str);
package/src/loop.cc CHANGED
@@ -92,9 +92,14 @@ static GSourceFuncs uv_loop_source_funcs = {
92
92
  static GSource *loop_source_new (uv_loop_t *loop) {
93
93
  struct uv_loop_source *source = (struct uv_loop_source *) g_source_new (&uv_loop_source_funcs, sizeof (*source));
94
94
  source->loop = loop;
95
+ #if OS_WINDOWS
96
+ // FIXME
97
+ // https://github.com/nodejs/node/issues/36015
98
+ #else
95
99
  g_source_add_unix_fd (&source->source,
96
100
  uv_backend_fd (loop),
97
101
  (GIOCondition) (G_IO_IN | G_IO_OUT | G_IO_ERR));
102
+ #endif
98
103
  return &source->source;
99
104
  }
100
105
 
@@ -133,7 +138,11 @@ static void CallNextTickCallback() {
133
138
 
134
139
  void CallMicrotaskHandlers () {
135
140
  CallNextTickCallback();
141
+ #if V8_MAJOR_VERSION >= 9
142
+ Isolate::GetCurrent()->PerformMicrotaskCheckpoint();
143
+ #else
136
144
  Isolate::GetCurrent()->RunMicrotasks();
145
+ #endif
137
146
  }
138
147
 
139
148
  void StartLoop() {
@@ -1336,119 +1336,115 @@ NAN_METHOD(tagEnd) {
1336
1336
  }
1337
1337
  #endif
1338
1338
 
1339
- #define SET_METHOD(tpl, name) Nan::SetPrototypeMethod(tpl, #name, name)
1340
-
1341
1339
  static void AttachMethods(Local<FunctionTemplate> tpl) {
1342
- SET_METHOD(tpl, status);
1343
- SET_METHOD(tpl, save);
1344
- SET_METHOD(tpl, restore);
1345
- SET_METHOD(tpl, getTarget);
1346
- SET_METHOD(tpl, pushGroup);
1347
- SET_METHOD(tpl, pushGroupWithContent);
1348
- SET_METHOD(tpl, popGroup);
1349
- SET_METHOD(tpl, popGroupToSource);
1350
- SET_METHOD(tpl, getGroupTarget);
1351
- SET_METHOD(tpl, setSourceRgb);
1352
- SET_METHOD(tpl, setSourceRgba);
1353
- SET_METHOD(tpl, setSource);
1354
- SET_METHOD(tpl, setSourceSurface);
1355
- SET_METHOD(tpl, getSource);
1356
- SET_METHOD(tpl, setAntialias);
1357
- SET_METHOD(tpl, getAntialias);
1358
- SET_METHOD(tpl, getDashCount);
1359
- SET_METHOD(tpl, getDash);
1360
- SET_METHOD(tpl, setFillRule);
1361
- SET_METHOD(tpl, getFillRule);
1362
- SET_METHOD(tpl, setLineCap);
1363
- SET_METHOD(tpl, getLineCap);
1364
- SET_METHOD(tpl, setLineJoin);
1365
- SET_METHOD(tpl, getLineJoin);
1366
- SET_METHOD(tpl, setLineWidth);
1367
- SET_METHOD(tpl, getLineWidth);
1368
- SET_METHOD(tpl, setMiterLimit);
1369
- SET_METHOD(tpl, getMiterLimit);
1370
- SET_METHOD(tpl, setOperator);
1371
- SET_METHOD(tpl, getOperator);
1372
- SET_METHOD(tpl, setTolerance);
1373
- SET_METHOD(tpl, getTolerance);
1374
- SET_METHOD(tpl, clip);
1375
- SET_METHOD(tpl, clipPreserve);
1376
- SET_METHOD(tpl, clipExtents);
1377
- SET_METHOD(tpl, inClip);
1378
- SET_METHOD(tpl, resetClip);
1379
- SET_METHOD(tpl, copyClipRectangleList);
1380
- SET_METHOD(tpl, fill);
1381
- SET_METHOD(tpl, fillPreserve);
1382
- SET_METHOD(tpl, fillExtents);
1383
- SET_METHOD(tpl, inFill);
1384
- SET_METHOD(tpl, mask);
1385
- SET_METHOD(tpl, maskSurface);
1386
- SET_METHOD(tpl, paint);
1387
- SET_METHOD(tpl, paintWithAlpha);
1388
- SET_METHOD(tpl, stroke);
1389
- SET_METHOD(tpl, strokePreserve);
1390
- SET_METHOD(tpl, strokeExtents);
1391
- SET_METHOD(tpl, inStroke);
1392
- SET_METHOD(tpl, copyPage);
1393
- SET_METHOD(tpl, showPage);
1394
- SET_METHOD(tpl, getReferenceCount);
1395
- SET_METHOD(tpl, copyPath);
1396
- SET_METHOD(tpl, copyPathFlat);
1397
- SET_METHOD(tpl, appendPath);
1398
- SET_METHOD(tpl, hasCurrentPoint);
1399
- SET_METHOD(tpl, getCurrentPoint);
1400
- SET_METHOD(tpl, newPath);
1401
- SET_METHOD(tpl, newSubPath);
1402
- SET_METHOD(tpl, closePath);
1403
- SET_METHOD(tpl, arc);
1404
- SET_METHOD(tpl, arcNegative);
1405
- SET_METHOD(tpl, curveTo);
1406
- SET_METHOD(tpl, lineTo);
1407
- SET_METHOD(tpl, moveTo);
1408
- SET_METHOD(tpl, rectangle);
1409
- SET_METHOD(tpl, glyphPath);
1410
- SET_METHOD(tpl, textPath);
1411
- SET_METHOD(tpl, relCurveTo);
1412
- SET_METHOD(tpl, relLineTo);
1413
- SET_METHOD(tpl, relMoveTo);
1414
- SET_METHOD(tpl, pathExtents);
1415
- SET_METHOD(tpl, showText);
1416
- SET_METHOD(tpl, showGlyphs);
1417
- SET_METHOD(tpl, showTextGlyphs);
1418
- SET_METHOD(tpl, fontExtents);
1419
- SET_METHOD(tpl, textExtents);
1420
- SET_METHOD(tpl, glyphExtents);
1421
- SET_METHOD(tpl, selectFontFace);
1422
- SET_METHOD(tpl, setFontSize);
1423
- SET_METHOD(tpl, setFontMatrix);
1424
- SET_METHOD(tpl, getFontMatrix);
1425
- SET_METHOD(tpl, setFontOptions);
1426
- SET_METHOD(tpl, getFontOptions);
1427
- SET_METHOD(tpl, setFontFace);
1428
- SET_METHOD(tpl, getFontFace);
1429
- SET_METHOD(tpl, setScaledFont);
1430
- SET_METHOD(tpl, getScaledFont);
1431
- SET_METHOD(tpl, translate);
1432
- SET_METHOD(tpl, scale);
1433
- SET_METHOD(tpl, rotate);
1434
- SET_METHOD(tpl, transform);
1435
- SET_METHOD(tpl, setMatrix);
1436
- SET_METHOD(tpl, getMatrix);
1437
- SET_METHOD(tpl, identityMatrix);
1438
- SET_METHOD(tpl, userToDevice);
1439
- SET_METHOD(tpl, userToDeviceDistance);
1440
- SET_METHOD(tpl, deviceToUser);
1441
- SET_METHOD(tpl, deviceToUserDistance);
1340
+ SET_PROTOTYPE_METHOD(tpl, status);
1341
+ SET_PROTOTYPE_METHOD(tpl, save);
1342
+ SET_PROTOTYPE_METHOD(tpl, restore);
1343
+ SET_PROTOTYPE_METHOD(tpl, getTarget);
1344
+ SET_PROTOTYPE_METHOD(tpl, pushGroup);
1345
+ SET_PROTOTYPE_METHOD(tpl, pushGroupWithContent);
1346
+ SET_PROTOTYPE_METHOD(tpl, popGroup);
1347
+ SET_PROTOTYPE_METHOD(tpl, popGroupToSource);
1348
+ SET_PROTOTYPE_METHOD(tpl, getGroupTarget);
1349
+ SET_PROTOTYPE_METHOD(tpl, setSourceRgb);
1350
+ SET_PROTOTYPE_METHOD(tpl, setSourceRgba);
1351
+ SET_PROTOTYPE_METHOD(tpl, setSource);
1352
+ SET_PROTOTYPE_METHOD(tpl, setSourceSurface);
1353
+ SET_PROTOTYPE_METHOD(tpl, getSource);
1354
+ SET_PROTOTYPE_METHOD(tpl, setAntialias);
1355
+ SET_PROTOTYPE_METHOD(tpl, getAntialias);
1356
+ SET_PROTOTYPE_METHOD(tpl, getDashCount);
1357
+ SET_PROTOTYPE_METHOD(tpl, getDash);
1358
+ SET_PROTOTYPE_METHOD(tpl, setFillRule);
1359
+ SET_PROTOTYPE_METHOD(tpl, getFillRule);
1360
+ SET_PROTOTYPE_METHOD(tpl, setLineCap);
1361
+ SET_PROTOTYPE_METHOD(tpl, getLineCap);
1362
+ SET_PROTOTYPE_METHOD(tpl, setLineJoin);
1363
+ SET_PROTOTYPE_METHOD(tpl, getLineJoin);
1364
+ SET_PROTOTYPE_METHOD(tpl, setLineWidth);
1365
+ SET_PROTOTYPE_METHOD(tpl, getLineWidth);
1366
+ SET_PROTOTYPE_METHOD(tpl, setMiterLimit);
1367
+ SET_PROTOTYPE_METHOD(tpl, getMiterLimit);
1368
+ SET_PROTOTYPE_METHOD(tpl, setOperator);
1369
+ SET_PROTOTYPE_METHOD(tpl, getOperator);
1370
+ SET_PROTOTYPE_METHOD(tpl, setTolerance);
1371
+ SET_PROTOTYPE_METHOD(tpl, getTolerance);
1372
+ SET_PROTOTYPE_METHOD(tpl, clip);
1373
+ SET_PROTOTYPE_METHOD(tpl, clipPreserve);
1374
+ SET_PROTOTYPE_METHOD(tpl, clipExtents);
1375
+ SET_PROTOTYPE_METHOD(tpl, inClip);
1376
+ SET_PROTOTYPE_METHOD(tpl, resetClip);
1377
+ SET_PROTOTYPE_METHOD(tpl, copyClipRectangleList);
1378
+ SET_PROTOTYPE_METHOD(tpl, fill);
1379
+ SET_PROTOTYPE_METHOD(tpl, fillPreserve);
1380
+ SET_PROTOTYPE_METHOD(tpl, fillExtents);
1381
+ SET_PROTOTYPE_METHOD(tpl, inFill);
1382
+ SET_PROTOTYPE_METHOD(tpl, mask);
1383
+ SET_PROTOTYPE_METHOD(tpl, maskSurface);
1384
+ SET_PROTOTYPE_METHOD(tpl, paint);
1385
+ SET_PROTOTYPE_METHOD(tpl, paintWithAlpha);
1386
+ SET_PROTOTYPE_METHOD(tpl, stroke);
1387
+ SET_PROTOTYPE_METHOD(tpl, strokePreserve);
1388
+ SET_PROTOTYPE_METHOD(tpl, strokeExtents);
1389
+ SET_PROTOTYPE_METHOD(tpl, inStroke);
1390
+ SET_PROTOTYPE_METHOD(tpl, copyPage);
1391
+ SET_PROTOTYPE_METHOD(tpl, showPage);
1392
+ SET_PROTOTYPE_METHOD(tpl, getReferenceCount);
1393
+ SET_PROTOTYPE_METHOD(tpl, copyPath);
1394
+ SET_PROTOTYPE_METHOD(tpl, copyPathFlat);
1395
+ SET_PROTOTYPE_METHOD(tpl, appendPath);
1396
+ SET_PROTOTYPE_METHOD(tpl, hasCurrentPoint);
1397
+ SET_PROTOTYPE_METHOD(tpl, getCurrentPoint);
1398
+ SET_PROTOTYPE_METHOD(tpl, newPath);
1399
+ SET_PROTOTYPE_METHOD(tpl, newSubPath);
1400
+ SET_PROTOTYPE_METHOD(tpl, closePath);
1401
+ SET_PROTOTYPE_METHOD(tpl, arc);
1402
+ SET_PROTOTYPE_METHOD(tpl, arcNegative);
1403
+ SET_PROTOTYPE_METHOD(tpl, curveTo);
1404
+ SET_PROTOTYPE_METHOD(tpl, lineTo);
1405
+ SET_PROTOTYPE_METHOD(tpl, moveTo);
1406
+ SET_PROTOTYPE_METHOD(tpl, rectangle);
1407
+ SET_PROTOTYPE_METHOD(tpl, glyphPath);
1408
+ SET_PROTOTYPE_METHOD(tpl, textPath);
1409
+ SET_PROTOTYPE_METHOD(tpl, relCurveTo);
1410
+ SET_PROTOTYPE_METHOD(tpl, relLineTo);
1411
+ SET_PROTOTYPE_METHOD(tpl, relMoveTo);
1412
+ SET_PROTOTYPE_METHOD(tpl, pathExtents);
1413
+ SET_PROTOTYPE_METHOD(tpl, showText);
1414
+ SET_PROTOTYPE_METHOD(tpl, showGlyphs);
1415
+ SET_PROTOTYPE_METHOD(tpl, showTextGlyphs);
1416
+ SET_PROTOTYPE_METHOD(tpl, fontExtents);
1417
+ SET_PROTOTYPE_METHOD(tpl, textExtents);
1418
+ SET_PROTOTYPE_METHOD(tpl, glyphExtents);
1419
+ SET_PROTOTYPE_METHOD(tpl, selectFontFace);
1420
+ SET_PROTOTYPE_METHOD(tpl, setFontSize);
1421
+ SET_PROTOTYPE_METHOD(tpl, setFontMatrix);
1422
+ SET_PROTOTYPE_METHOD(tpl, getFontMatrix);
1423
+ SET_PROTOTYPE_METHOD(tpl, setFontOptions);
1424
+ SET_PROTOTYPE_METHOD(tpl, getFontOptions);
1425
+ SET_PROTOTYPE_METHOD(tpl, setFontFace);
1426
+ SET_PROTOTYPE_METHOD(tpl, getFontFace);
1427
+ SET_PROTOTYPE_METHOD(tpl, setScaledFont);
1428
+ SET_PROTOTYPE_METHOD(tpl, getScaledFont);
1429
+ SET_PROTOTYPE_METHOD(tpl, translate);
1430
+ SET_PROTOTYPE_METHOD(tpl, scale);
1431
+ SET_PROTOTYPE_METHOD(tpl, rotate);
1432
+ SET_PROTOTYPE_METHOD(tpl, transform);
1433
+ SET_PROTOTYPE_METHOD(tpl, setMatrix);
1434
+ SET_PROTOTYPE_METHOD(tpl, getMatrix);
1435
+ SET_PROTOTYPE_METHOD(tpl, identityMatrix);
1436
+ SET_PROTOTYPE_METHOD(tpl, userToDevice);
1437
+ SET_PROTOTYPE_METHOD(tpl, userToDeviceDistance);
1438
+ SET_PROTOTYPE_METHOD(tpl, deviceToUser);
1439
+ SET_PROTOTYPE_METHOD(tpl, deviceToUserDistance);
1442
1440
  #if CAIRO_VERSION_MAJOR >= 1 && CAIRO_VERSION_MINOR >= 16
1443
- SET_METHOD(tpl, tagBegin);
1441
+ SET_PROTOTYPE_METHOD(tpl, tagBegin);
1444
1442
  #endif
1445
1443
  #if CAIRO_VERSION_MAJOR >= 1 && CAIRO_VERSION_MINOR >= 16
1446
- SET_METHOD(tpl, tagEnd);
1444
+ SET_PROTOTYPE_METHOD(tpl, tagEnd);
1447
1445
  #endif
1448
1446
  }
1449
1447
 
1450
- #undef SET_METHOD
1451
-
1452
1448
  /* </ auto-generated */
1453
1449
 
1454
1450
  static void InstanceDestroyed(const Nan::WeakCallbackInfo<ContextInfo> &info);
@@ -521,8 +521,6 @@ function getReturn(fn, outArguments) {
521
521
 
522
522
  function getAttachMethods(name, functions) {
523
523
  return unindent(`
524
- #define SET_METHOD(tpl, name) Nan::SetPrototypeMethod(tpl, #name, name)
525
-
526
524
  static void AttachMethods(Local<FunctionTemplate> tpl) {
527
525
  ${functions.map(fn =>
528
526
  (fn.attributes.version ? (() => {
@@ -533,12 +531,10 @@ function getAttachMethods(name, functions) {
533
531
  (micro ? 'CAIRO_VERSION_MICRO >= ' + micro : undefined),
534
532
  ].filter(Boolean).join(' && ') + '\n '
535
533
  })() : '')
536
- + `SET_METHOD(tpl, ${getJSName(fn.name)});`
534
+ + `SET_PROTOTYPE_METHOD(tpl, ${getJSName(fn.name)});`
537
535
  + (fn.attributes.version ? '\n #endif' : '')
538
536
  ).join('\n ')}
539
537
  }
540
-
541
- #undef SET_METHOD
542
538
  `)
543
539
  }
544
540
 
package/src/type.cc CHANGED
@@ -256,13 +256,13 @@ GITypeTag GetStorageType (GITypeInfo *type_info) {
256
256
  GITypeTag type_tag = g_type_info_get_tag (type_info);
257
257
 
258
258
  if (type_tag == GI_TYPE_TAG_INTERFACE) {
259
- GIBaseInfo *interface = g_type_info_get_interface (type_info);
260
- GIInfoType interface_type = g_base_info_get_type (interface);
259
+ GIBaseInfo *iface = g_type_info_get_interface (type_info);
260
+ GIInfoType iface_type = g_base_info_get_type (iface);
261
261
 
262
- if (interface_type == GI_INFO_TYPE_ENUM || interface_type == GI_INFO_TYPE_FLAGS)
263
- type_tag = g_enum_info_get_storage_type ((GIEnumInfo *)interface);
262
+ if (iface_type == GI_INFO_TYPE_ENUM || iface_type == GI_INFO_TYPE_FLAGS)
263
+ type_tag = g_enum_info_get_storage_type ((GIEnumInfo *)iface);
264
264
 
265
- g_base_info_unref (interface);
265
+ g_base_info_unref (iface);
266
266
  }
267
267
 
268
268
  return type_tag;