Skip to content

Commit

Permalink
cutoff the __slice__ fn in SysObj
Browse files Browse the repository at this point in the history
  • Loading branch information
pikasTech committed May 30, 2022
1 parent 81f0a38 commit 0a48afb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/PikaStdLib/PikaStdLib_SysObj.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 340,7 @@ Arg* PikaStdLib_SysObj___slice__(PikaObj* self,
Arg* obj,
Arg* start,
int step) {
#if PIKA_SYNTEX_ITEM_SLICE_ENABLE
/* No interger index only support __get__ */
if (!(arg_getType(start) == ARG_TYPE_INT &&
arg_getType(end) == ARG_TYPE_INT)) {
Expand Down Expand Up @@ -385,6 386,7 @@ Arg* PikaStdLib_SysObj___slice__(PikaObj* self,
}
return sliced_arg;
}
#endif

return arg_setNull(NULL);
}
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 340,7 @@ Arg* PikaStdLib_SysObj___slice__(PikaObj* self,
Arg* obj,
Arg* start,
int step) {
#if PIKA_SYNTEX_ITEM_SLICE_ENABLE
/* No interger index only support __get__ */
if (!(arg_getType(start) == ARG_TYPE_INT &&
arg_getType(end) == ARG_TYPE_INT)) {
Expand Down Expand Up @@ -385,6 386,7 @@ Arg* PikaStdLib_SysObj___slice__(PikaObj* self,
}
return sliced_arg;
}
#endif

return arg_setNull(NULL);
}

0 comments on commit 0a48afb

Please sign in to comment.