Skip to content

Move RefBase and the LifecycleHelper primary template into bind_lang/. - #486

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_989542143
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_989542143

Conversation

@copybara-service

Copy link
Copy Markdown

Move RefBase and the LifecycleHelper primary template into bind_lang/.

  • implementation/ref_base.h moves to bind_lang/ref_base.h (namespace bind_lang). Its unused friend struct EntryBase is dropped: EntryBase only touches Base::object_ref_, which is already accessible to derived classes, and naming it would make bind_lang depend on JNI Bind.
  • New bind_lang/lifecycle.h declares LifecycleType and the primary LifecycleHelper<Span, LifecycleType> template. JNI Bind (and later Proto Bind) specialize it for their own handle types.
  • JNI specializations (jobject, jclass, jstring, and the generic local/global fallbacks) stay in implementation/jni_helper/, but are declared in namespace bind_lang as the language requires. jni::LifecycleType, jni::LifecycleHelper, jni::RefBase, etc. remain available via using-declarations.

…lang/`.

* `implementation/ref_base.h` moves to `bind_lang/ref_base.h` (`namespace bind_lang`). Its unused `friend struct EntryBase` is dropped: `EntryBase` only touches `Base::object_ref_`, which is already accessible to derived classes, and naming it would make `bind_lang` depend on JNI Bind.
* New `bind_lang/lifecycle.h` declares `LifecycleType` and the primary `LifecycleHelper<Span, LifecycleType>` template. JNI Bind (and later Proto Bind) specialize it for their own handle types.
* JNI specializations (`jobject`, `jclass`, `jstring`, and the generic local/global fallbacks) stay in `implementation/jni_helper/`, but are declared in `namespace bind_lang` as the language requires. `jni::LifecycleType`, `jni::LifecycleHelper`, `jni::RefBase`, etc. remain available via using-declarations.

PiperOrigin-RevId: 989542143

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant