Skip to content

Commit f6002ad

Browse files
committed
[GR-15351] [GR-15355] Update polyglot header file and use new Sulong home layout.
PullRequest: graalpython/494
2 parents e745d01 + 6129a22 commit f6002ad

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128

129129
local labsjdk8Mixin = {
130130
downloads +: {
131-
JAVA_HOME: utils.download("labsjdk", "8u202-jvmci-0.58"),
131+
JAVA_HOME: utils.download("labsjdk", "8u202-jvmci-0.59"),
132132
EXTRA_JAVA_HOMES : { pathlist: [utils.download("oraclejdk", "11+28")] },
133133
},
134134
environment +: {

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.

mx.graalpython/mx_graalpython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def update_import_cmd(args):
637637
join(mx.dependency("SULONG_LEGACY").output, "include", "truffle.h"),
638638
join(SUITE.dir, "graalpython", "com.oracle.graal.python.cext", "include", "truffle.h")
639639
) and shutil.copy(
640-
join(mx.dependency("SULONG_LIBS").output, "polyglot.h"),
640+
join(mx.dependency("SULONG_HOME").output, "include", "polyglot.h"),
641641
join(SUITE.dir, "graalpython", "com.oracle.graal.python.cext", "include", "polyglot.h")
642642
)
643643
else:

mx.graalpython/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
},
4545
{
4646
"name": "sulong",
47-
"version": "28fad3a04a05b2c4039edf2a752d5926223965bf",
47+
"version": "636e1ca4fa50df0b7741aa1e1e12f474bee3dd5a",
4848
"subdir": True,
4949
"urls": [
5050
{"url": "https://github.com/oracle/graal", "kind": "git"},
5151
]
5252
},
5353
{
5454
"name": "regex",
55-
"version": "28fad3a04a05b2c4039edf2a752d5926223965bf",
55+
"version": "636e1ca4fa50df0b7741aa1e1e12f474bee3dd5a",
5656
"subdir": True,
5757
"urls": [
5858
{"url": "https://github.com/oracle/graal", "kind": "git"},
@@ -233,11 +233,11 @@
233233
"results": ["graalpython/lib-graalpython"],
234234
"output": ".",
235235
"buildDependencies": [
236-
"sulong:SULONG_LIBS",
236+
"sulong:SULONG_HOME",
237237
"sulong:SULONG_LEGACY",
238238
],
239239
"buildEnv": {
240-
"POLYGLOT_INC": "<path:SULONG_LIBS>",
240+
"POLYGLOT_INC": "<path:SULONG_HOME>/include",
241241
},
242242
},
243243

0 commit comments

Comments
 (0)