Skip to content

Commit 2ca4db0

Browse files
committed
Update native repr handling to fit latest thinking.
1 parent 3339a14 commit 2ca4db0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/6model/reprs/P6int.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ static PMC * instance_of(PARROT_INTERP, PMC *self, PMC *WHAT) {
3636
/* Checks if a given object is defined (from the point of view of the
3737
* representation). */
3838
static INTVAL defined(PARROT_INTERP, PMC *self, PMC *obj) {
39-
/* Native types cannot be undefined. */
40-
return 1;
39+
/* Native types only ever exist as the type object, which is undefined. */
40+
return 0;
4141
}
4242

4343
/* Helper to die because this type doesn't support attributes. */

src/6model/reprs/P6num.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ static PMC * instance_of(PARROT_INTERP, PMC *self, PMC *WHAT) {
3636
/* Checks if a given object is defined (from the point of view of the
3737
* representation). */
3838
static INTVAL defined(PARROT_INTERP, PMC *self, PMC *obj) {
39-
/* Native types cannot be undefined. */
40-
return 1;
39+
/* Native types only ever exist as the type object, which is undefined. */
40+
return 0;
4141
}
4242

4343
/* Helper to die because this type doesn't support attributes. */

src/6model/reprs/P6str.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ static PMC * instance_of(PARROT_INTERP, PMC *self, PMC *WHAT) {
3636
/* Checks if a given object is defined (from the point of view of the
3737
* representation). */
3838
static INTVAL defined(PARROT_INTERP, PMC *self, PMC *obj) {
39-
/* Native types cannot be undefined. */
40-
return 1;
39+
/* Native types only ever exist as the type object, which is undefined. */
40+
return 0;
4141
}
4242

4343
/* Helper to die because this type doesn't support attributes. */

0 commit comments

Comments
 (0)