Skip to content

Commit b446492

Browse files
committed
Update hint_for for consistency with the rest of the REPR API.
1 parent a76cd8b commit b446492

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

src/6model/reprs/HashAttrStore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
7474
}
7575

7676
/* Gets the hint for the given attribute ID. */
77-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
77+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *name) {
7878
return NO_HINT;
7979
}
8080

src/6model/reprs/KnowHOWREPR.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
8282
}
8383

8484
/* Gets the hint for the given attribute ID. */
85-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
85+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *name) {
8686
return NO_HINT;
8787
}
8888

src/6model/reprs/P6int.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
7474
}
7575

7676
/* Gets the hint for the given attribute ID. */
77-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
77+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *name) {
7878
return NO_HINT;
7979
}
8080

src/6model/reprs/P6num.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
7575
}
7676

7777
/* Gets the hint for the given attribute ID. */
78-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
78+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *name) {
7979
return NO_HINT;
8080
}
8181

src/6model/reprs/P6opaque.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,12 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
520520
}
521521

522522
/* Gets the hint for the given attribute ID. */
523-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_key, STRING *name) {
523+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_key, STRING *name) {
524524
INTVAL slot;
525-
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)STABLE(obj)->REPR_data;
525+
P6opaqueREPRData *repr_data = (P6opaqueREPRData *)st->REPR_data;
526526
if (!repr_data->allocation_size) {
527-
compute_allocation_strategy(interp, obj, repr_data);
528-
PARROT_GC_WRITE_BARRIER(interp, STABLE_PMC(obj));
527+
compute_allocation_strategy(interp, st->WHAT, repr_data);
528+
PARROT_GC_WRITE_BARRIER(interp, st->stable_pmc);
529529
}
530530
slot = try_get_slot(interp, repr_data, class_key, name);
531531
return slot >= 0 ? slot : NO_HINT;

src/6model/reprs/P6str.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void bind_attribute_ref(PARROT_INTERP, STable *st, void *data, PMC *class
7575
}
7676

7777
/* Gets the hint for the given attribute ID. */
78-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
78+
static INTVAL hint_for(PARROT_INTERP, STable *st, PMC *class_handle, STRING *name) {
7979
return NO_HINT;
8080
}
8181

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_ref(PARROT_INTERP, STable *st, void *data, PMC *class
8181
}
8282

8383
/* Gets the hint for the given attribute ID. */
84-
static INTVAL hint_for(PARROT_INTERP, PMC *obj, PMC *class_handle, STRING *name) {
84+
static INTVAL hint_for(PARROT_INTERP, STable *st, 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
@@ -196,7 +196,7 @@ struct SixModel_REPROps {
196196
PMC *class_handle, STRING *name, INTVAL hint, void *value);
197197

198198
/* Gets the hint for the given attribute ID. */
199-
INTVAL (*hint_for) (PARROT_INTERP, PMC *Object, PMC *ClassHandle, STRING *Name);
199+
INTVAL (*hint_for) (PARROT_INTERP, STable *st, PMC *class_handle, STRING *name);
200200

201201
/* Clones the object, optionally cloning any containers in its
202202
* attributes. */

src/ops/nqp.ops

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ inline op stable_publish_vtable_handler_mapping(in PMC, in PMC) :base_core {
12201220
st->parrot_vtable_handler_mapping[idx].class_handle = class_handle;
12211221
st->parrot_vtable_handler_mapping[idx].attr_name = attr_name;
12221222
st->parrot_vtable_handler_mapping[idx].hint =
1223-
REPR(class_handle)->hint_for(interp, target, class_handle, attr_name);
1223+
REPR(class_handle)->hint_for(interp, STABLE(target), class_handle, attr_name);
12241224
}
12251225
else
12261226
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
@@ -1459,7 +1459,7 @@ Gets lookup hint for an attribute.
14591459
inline op repr_hint_for(out INT, in PMC, in PMC, in STR) :base_core {
14601460
PMC *ch = decontainerize(interp, $3);
14611461
if ($2->vtable->base_type == smo_id)
1462-
$1 = REPR($2)->hint_for(interp, $2, $3, $4);
1462+
$1 = REPR($2)->hint_for(interp, STABLE($2), $3, $4);
14631463
else
14641464
$1 = NO_HINT;
14651465
}

0 commit comments

Comments
 (0)