Interface CacheDupFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Deprecated @Generated("org.javagi.JavaGI") public interface CacheDupFunc extends FunctionPointer
Deprecated.

Functional interface declaration of the CacheDupFunc callback.

See Also:
  • Method Details

    • run

      @Deprecated MemorySegment run(@Nullable MemorySegment value)
      Deprecated.
      Use a GHashTable instead
      Specifies the type of the keyDupFunc function passed to g_cache_new(). The function is passed a key (not a value as the prototype implies) and should return a duplicate of the key.
      Parameters:
      value - the GCache key to destroy (not a GCache value as it seems)
      Returns:
      a copy of the GCache key
    • upcall

      default MemorySegment upcall(MemorySegment value)
      Deprecated.
      The upcall method is called from native code. The parameters are marshaled and run(MemorySegment) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Deprecated.
      Creates a native function pointer to the upcall(MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer