Skip to content

Commit bd27ed3

Browse files
committed
Update 'polyglot.h'.
1 parent e745d01 commit bd27ed3

File tree

1 file changed

+16
-7
lines changed
  • graalpython/com.oracle.graal.python.cext/include

1 file changed

+16
-7
lines changed

graalpython/com.oracle.graal.python.cext/include/polyglot.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,15 @@ void *polyglot_new_instance(const void *object, ...);
353353
*/
354354
bool polyglot_has_members(const void *value);
355355

356+
/**
357+
* Check whether a polyglot value contains a given named member.
358+
*
359+
* @param object the polyglot value to test
360+
* @param name the name of the member to be checked for existance
361+
* @return true if the member exists, false otherwise
362+
*/
363+
bool polyglot_has_member(const void *value, const char *name);
364+
356365
/**
357366
* Read a named member from a polyglot object.
358367
*
@@ -676,37 +685,37 @@ __POLYGLOT_DECLARE_GENERIC_ARRAY(double, double)
676685
/**
677686
* Get a polyglot typeid for the primitive bool type.
678687
*/
679-
static void *polyglot_boolean_typeid();
688+
static polyglot_typeid polyglot_boolean_typeid();
680689

681690
/**
682691
* Get a polyglot typeid for the primitive int8_t type.
683692
*/
684-
static void *polyglot_int8_typeid();
693+
static polyglot_typeid polyglot_int8_typeid();
685694

686695
/**
687696
* Get a polyglot typeid for the primitive int16_t type.
688697
*/
689-
static void *polyglot_int16_typeid();
698+
static polyglot_typeid polyglot_int16_typeid();
690699

691700
/**
692701
* Get a polyglot typeid for the primitive int32_t type.
693702
*/
694-
static void *polyglot_int32_typeid();
703+
static polyglot_typeid polyglot_int32_typeid();
695704

696705
/**
697706
* Get a polyglot typeid for the primitive int64_t type.
698707
*/
699-
static void *polyglot_int64_typeid();
708+
static polyglot_typeid polyglot_int64_typeid();
700709

701710
/**
702711
* Get a polyglot typeid for the primitive float type.
703712
*/
704-
static void *polyglot_float_typeid();
713+
static polyglot_typeid polyglot_float_typeid();
705714

706715
/**
707716
* Get a polyglot typeid for the primitive double type.
708717
*/
709-
static void *polyglot_double_typeid();
718+
static polyglot_typeid polyglot_double_typeid();
710719

711720
/**
712721
* Converts a polyglot value to an integer array.

0 commit comments

Comments
 (0)