Skip to content

Commit aefcdc4

Browse files
committed
neuronapi: reword 'cell' to 'slot' in nrn_object_ptr_push docs
Per review: 'cell' collides with its NEURON meaning (a neuron). Use 'slot' for the Object* storage location in the docs and the matching source comment.
1 parent 567bda4 commit aefcdc4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/capi.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,13 @@ Functions, objects, and the stack
879879
880880
.. c:function:: void nrn_object_ptr_push(Object** obj_ref)
881881
882-
Push a writable object-reference cell onto the stack.
882+
Push a writable object-reference slot onto the stack.
883883
884-
:param obj_ref: Address of the caller's ``Object*`` cell.
884+
:param obj_ref: Address of the caller's ``Object*`` slot.
885885
886886
Unlike :c:func:`nrn_object_push`, which pushes an object by value, this
887-
pushes the *cell* holding the object. When the callee assigns to the
888-
matching ``$oN`` argument, the assignment writes back through the cell and
887+
pushes the *slot* holding the object. When the callee assigns to the
888+
matching ``$oN`` argument, the assignment writes back through the slot and
889889
updates ``*obj_ref`` in place. This is the out-parameter form used by the
890890
``h.ref(obj)`` idiom, where a function returns a value by storing it in a
891891
caller-supplied object reference. ("ptr", as in :c:func:`nrn_double_ptr_push`,

src/nrniv/neuronapi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ void nrn_object_push(Object* obj) {
318318
}
319319

320320
void nrn_object_ptr_push(Object** obj_ref) {
321-
// Push a writable object-reference cell (the out-parameter form of
321+
// Push a writable object-reference slot (the out-parameter form of
322322
// nrn_object_push). When a callee assigns to the corresponding $oN arg,
323-
// hoc assigns through this cell, updating *obj_ref in place. Unlike
323+
// hoc assigns through this slot, updating *obj_ref in place. Unlike
324324
// nrn_object_push, which pushes an object by value, this exposes the
325325
// h.ref(obj) idiom (a callee that writes back into the caller's objref).
326326
// Named for the pointer it pushes (cf. nrn_double_ptr_push); the "ref" in

0 commit comments

Comments
 (0)