Skip to content

Commit b9cf1cb

Browse files
committed
Fix some insanity in the hint_for API.
1 parent 0e9d828 commit b9cf1cb

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

src/6model/reprs/HashAttrStore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
9292
}
9393

9494
/* Gets the hint for the given attribute ID. */
95-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
95+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
9696
return NO_HINT;
9797
}
9898

src/6model/reprs/KnowHOWREPR.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
8484
}
8585

8686
/* Gets the hint for the given attribute ID. */
87-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
87+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
8888
return NO_HINT;
8989
}
9090

src/6model/reprs/P6int.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
8383
}
8484

8585
/* Gets the hint for the given attribute ID. */
86-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
86+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
8787
return NO_HINT;
8888
}
8989

src/6model/reprs/P6num.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
8383
}
8484

8585
/* Gets the hint for the given attribute ID. */
86-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
86+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
8787
return NO_HINT;
8888
}
8989

src/6model/reprs/P6opaque.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
585585
}
586586

587587
/* Gets the hint for the given attribute ID. */
588-
static INTVAL hint_for(PARROT_INTERP, PMC *class_key, STRING *name) {
589-
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)STABLE(class_key)->REPR_data;
588+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_key, STRING *name) {
589+
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)STABLE(obj)->REPR_data;
590590
INTVAL slot = try_get_slot(interp, repr_data, class_key, name);
591591
return slot >= 0 ? slot : NO_HINT;
592592
}

src/6model/reprs/P6str.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
8383
}
8484

8585
/* Gets the hint for the given attribute ID. */
86-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
86+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
8787
return NO_HINT;
8888
}
8989

src/6model/reprs/Uninstantiable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static void bind_attribute_str(PARROT_INTERP, PMC *obj, PMC *class_handle, STRIN
8181
}
8282

8383
/* Gets the hint for the given attribute ID. */
84-
static INTVAL hint_for(PARROT_INTERP, PMC *class_handle, STRING *name) {
84+
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
8585
return NO_HINT;
8686
}
8787

src/6model/sixmodelobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct SixModel_REPROps {
175175
void (*bind_attribute_str) (PARROT_INTERP, PMC *Object, PMC *ClassHandle, STRING *Name, INTVAL Hint, STRING *Value);
176176

177177
/* Gets the hint for the given attribute ID. */
178-
INTVAL (*hint_for) (PARROT_INTERP, PMC *ClassHandle, STRING *Name);
178+
INTVAL (*hint_for) (PARROT_INTERP, PMC *Object, PMC *ClassHandle, STRING *Name);
179179

180180
/* Clones the object, optionally cloning any containers in its
181181
* attributes. */

src/ops/nqp.ops

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ inline op stable_publish_vtable_handler_mapping(in PMC, in PMC) :base_core {
11011101
st->parrot_vtable_handler_mapping[idx].class_handle = class_handle;
11021102
st->parrot_vtable_handler_mapping[idx].attr_name = attr_name;
11031103
st->parrot_vtable_handler_mapping[idx].hint =
1104-
REPR(class_handle)->hint_for(interp, class_handle, attr_name);
1104+
REPR(class_handle)->hint_for(interp, target, class_handle, attr_name);
11051105
}
11061106
else
11071107
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,

0 commit comments

Comments
 (0)