Mark few JVM-compatibility declarations deprecated. (#2029)
This commit is contained in:
+14
@@ -340,6 +340,20 @@ manually:
|
||||
|
||||
In all cases the C string is supposed to be encoded as UTF-8.
|
||||
|
||||
To skip automatic conversion and ensure raw pointers are used in the bindings `noStringConversion`
|
||||
statement in `.def` file could be used, i.e.
|
||||
```
|
||||
noStringConversion = LoadCursorA LoadCursorW
|
||||
```
|
||||
This way any value of type `CPointer<ByteVar>` could be passed as an argument of `const char*` type.
|
||||
If Kotlin string shall me passed code like that could be used:
|
||||
```kotlin
|
||||
memScoped {
|
||||
LoadCursorA(null, "cursor.bmp".cstr.ptr) // for ASCII version
|
||||
LoadCursorW(null, "cursor.bmp".wcstr.ptr) // for Unicode version
|
||||
}
|
||||
```
|
||||
|
||||
### Scope-local pointers ###
|
||||
|
||||
It is possible to create scope-stable pointer of C representation of `CValues<T>`
|
||||
|
||||
@@ -11,10 +11,12 @@ package kotlin
|
||||
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Deprecated("Do not use Volatile annotation in pure Kotlin/Native code", level = DeprecationLevel.ERROR)
|
||||
public annotation class Volatile
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Deprecated("Do not use Synchronized annotation in pure Kotlin/Native code", level = DeprecationLevel.ERROR)
|
||||
public annotation class Synchronized
|
||||
|
||||
/**
|
||||
@@ -22,5 +24,6 @@ public annotation class Synchronized
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@kotlin.internal.InlineOnly
|
||||
@Deprecated("Do not use 'synchronized' function in Kotlin/Native code", level = DeprecationLevel.ERROR)
|
||||
public actual inline fun <R> synchronized(@Suppress("UNUSED_PARAMETER") lock: Any, block: () -> R): R =
|
||||
throw UnsupportedOperationException("synchronized() is unsupported")
|
||||
Reference in New Issue
Block a user