Skip to content

Commit 6fdaaa7

Browse files
committed
PArguments: getNumberOfUserArgs utility function
1 parent dc3f3ee commit 6fdaaa7

File tree

1 file changed

+4
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function

1 file changed

+4
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function/PArguments.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,8 @@ public static Object[] insertSelf(Object[] arguments, Object self) {
232232

233233
return results;
234234
}
235+
236+
public static int getNumberOfUserArgs(Object[] arguments) {
237+
return arguments.length - PArguments.USER_ARGUMENTS_OFFSET;
238+
}
235239
}

0 commit comments

Comments
 (0)