Skip to content

Commit

Permalink
Fixing hardcoded library path in some kotlin templates (#691)
Browse files Browse the repository at this point in the history
Co-authored-by: Ellen Arteca <emarteca@google.com>
  • Loading branch information
emarteca and Ellen Arteca authored Sep 17, 2024
1 parent 57e8916 commit 599eebe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tool/templates/kotlin/Enum.kt.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum class {{type_name}}

companion object {
internal val libClass: Class<{{type_name}}Lib> = {{type_name}}Lib::class.java
internal val lib: {{type_name}}Lib = Native.load("somelib", libClass)
internal val lib: {{type_name}}Lib = Native.load("{{lib_name}}", libClass)

{%- match (variants_for_native) %}
{%- when EnumVariants::NonContiguous with (variants) %}
Expand Down
2 changes: 1 addition & 1 deletion tool/templates/kotlin/Struct.kt.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class {{type_name}} internal constructor (
{% if !fields.is_empty() -%}
companion object {
internal val libClass: Class<{{type_name}}Lib> = {{type_name}}Lib::class.java
internal val lib: {{type_name}}Lib = Native.load("somelib", libClass)
internal val lib: {{type_name}}Lib = Native.load("{{lib_name}}", libClass)
val NATIVESIZE: Long = Native.getNativeSize({{type_name}}Native::class.java).toLong()
{%- for m in companion_methods %}
{{m|indent(8)}}
Expand Down

0 comments on commit 599eebe

Please sign in to comment.