Changeset 35662 in osm


Ignore:
Timestamp:
2020-12-06T02:51:47+01:00 (3 years ago)
Author:
Don-vip
Message:

see #20205 - remove unneeded class

Location:
applications/editors/josm/plugins/jna/src/org/openstreetmap/josm/plugins/jna/mac
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/jna/src/org/openstreetmap/josm/plugins/jna/mac/Foundation.java

    r35660 r35662  
    55
    66import com.sun.jna.Native; // NOSONAR
     7import com.sun.jna.NativeLong;
    78
    89/**
     
    4142     */
    4243    public static void nsLog(String format, Object args) {
    43         ID formatAsCFString = cfString(format);
     44        NativeLong formatAsCFString = cfString(format);
    4445        try {
    4546            foundationLibrary.NSLog(formatAsCFString, args);
     
    5455     * Note that the returned string must be freed with {@link #cfRelease(ID)}.
    5556     */
    56     static ID cfString(String s) {
     57    static NativeLong cfString(String s) {
    5758        // Use a byte[] rather than letting jna do the String -> char* marshalling itself.
    5859        // Turns out about 10% quicker for long strings.
     
    6566     * Release the NSObject with id
    6667     */
    67     static void cfRelease(ID id) {
     68    static void cfRelease(NativeLong id) {
    6869        foundationLibrary.CFRelease(id);
    6970    }
  • applications/editors/josm/plugins/jna/src/org/openstreetmap/josm/plugins/jna/mac/FoundationLibrary.java

    r35659 r35662  
    33
    44import com.sun.jna.Library; // NOSONAR
     5import com.sun.jna.NativeLong;
    56
    67/**
     
    1112interface FoundationLibrary extends Library {
    1213
    13     void NSLog(ID pString, Object thing);
     14    void NSLog(NativeLong pString, Object thing);
    1415
    15     ID CFStringCreateWithBytes(ID allocator, byte[] bytes, int byteCount, int encoding, byte isExternalRepresentation);
     16    NativeLong CFStringCreateWithBytes(NativeLong allocator, byte[] bytes, int byteCount, int encoding,
     17            byte isExternalRepresentation);
    1618
    17     void CFRelease(ID cfTypeRef);
     19    void CFRelease(NativeLong cfTypeRef);
    1820}
Note: See TracChangeset for help on using the changeset viewer.