@@ -1285,9 +1285,9 @@ these classes.
1285
1285
designator class name.
1286
1286
1287
1287
:macrocall:
1288
- .. code-block :: dylan
1288
+ .. parsed-literal ::
1289
1289
1290
- define C-pointer-type * pointer-class-name* => * designator-class-name*
1290
+ define C-pointer-type ` pointer-class-name ` => ` designator-class-name `
1291
1291
1292
1292
:parameter pointer-class-name: A Dylan variable name.
1293
1293
:value designator-class: A Dylan name.
@@ -2263,27 +2263,27 @@ Defining specialized versions of designator classes
2263
2263
existing designator class for that type.
2264
2264
2265
2265
:macrocall:
2266
- .. code-block :: dylan
2266
+ .. parsed-literal ::
2267
2267
2268
- define [* modifiers* * ] C-subtype name ( superclasses)
2269
- [* slot-spec* ; ...] [;]
2270
- [* type-options* ] [;]
2271
- end [C-subtype] [* name* ]
2268
+ define [` modifiers ` ] C-subtype ` name ` (` superclasses ` )
2269
+ [` slot-spec ` ; ...] [;]
2270
+ [` type-options ` ] [;]
2271
+ end [C-subtype] [name]
2272
2272
2273
- :parameter modifiers: The same as the modifiers allowed in :drm: `define class <class> `.
2273
+ :parameter modifiers: The same as the modifiers allowed in :drm: `define class `.
2274
2274
:parameter name: A Dylan variable name.
2275
2275
:parameter superclasses: A list of Dylan names.
2276
- :parameter slot-spec: Same syntax as a slot definition in `` define class ` `.
2276
+ :parameter slot-spec: Same syntax as a slot definition in :drm: ` define class `.
2277
2277
:parameter type-options: A property list.
2278
2278
2279
2279
:description:
2280
2280
2281
2281
Defines a specialized designator class for a C type based on an
2282
2282
existing designator class for that type. It does this by defining a
2283
2283
subclass of the original designator class, and is a simple wrapper
2284
- around :drm: `define class <class> ` from which it takes its syntax. The
2285
- superclasses, slot-specs, and *modifiers * are passed on to ` `define
2286
- class `` unchanged. In effect, it expands to:
2284
+ around :drm: `define class ` from which it takes its syntax. The
2285
+ superclasses, slot-specs, and *modifiers * are passed on to :drm: `define
2286
+ class ` unchanged. In effect, it expands to:
2287
2287
2288
2288
.. code-block :: dylan
2289
2289
@@ -2295,7 +2295,7 @@ Defining specialized versions of designator classes
2295
2295
single: define C-subtype definition macro
2296
2296
single: define C-subtype; define C-subtype
2297
2297
2298
- In terms of C, `` define C-subtype ` ` can be thought of as
2298
+ In terms of C, :macro: ` define C-subtype ` can be thought of as
2299
2299
implementing a strongly typed version of ``typedef `` because a new
2300
2300
designator class is generated that Dylan's type system can
2301
2301
distinguish from the designator class on which it was based. As
@@ -2427,20 +2427,20 @@ Defining specialized designator classes
2427
2427
Allows you to define a name to which to bind a pointer designator.
2428
2428
2429
2429
:macrocall:
2430
- .. code-block :: dylan
2430
+ .. parsed-literal ::
2431
+
2432
+ define [`modifier ` ...] C-mapped-subtype `type-name ` (`superclass ` )
2433
+ [map `high-level-type `
2434
+ [, import-function: `import-fun ` ]
2435
+ [, export-function: `export-fun ` ];]
2436
+ [import-map `high-level-type `,
2437
+ import-function: `import-fun ` ;]
2438
+ [export-map `high-level-type `,
2439
+ export-function: `export-fun ` ;]
2440
+ [`type-options `]
2441
+ end
2431
2442
2432
- define *modifiers* C-mapped-subtype *type-name* (*superclasses*)
2433
- [map *high-level-type*
2434
- [, import-function: *import-fun* ]
2435
- [, export-function: *export-fun* ];]
2436
- [import-map *high-level-type*,
2437
- import-function: *import-fun* ;]
2438
- [export-map *high-level-type*,
2439
- export-function: *export-fun* ;]
2440
- [type-options]
2441
- end
2442
-
2443
- :parameter modifiers: The same as the modifiers allowed in :drm: `define-class <class> `.
2443
+ :parameter modifiers: The same as the modifiers allowed in :drm: `define-class `.
2444
2444
:parameter type-name: A Dylan variable name.
2445
2445
:parameter superclasses: A list of Dylan names.
2446
2446
:parameter high-level-type: An instance of a Dylan :drm: `<type> `.
@@ -2653,12 +2653,12 @@ Describing structure types
2653
2653
Describes C's aggregate structures.
2654
2654
2655
2655
:macrocall:
2656
- .. code-block :: dylan
2656
+ .. parsed-literal ::
2657
2657
2658
- define C-struct * name*
2659
- [* slot-spec* ; ...] [;]
2660
- [* type-options* ] [;]
2661
- end [C-struct] [* name* ]
2658
+ define C-struct ` name `
2659
+ [` slot-spec ` ; ...] [;]
2660
+ [` type-options ` ] [;]
2661
+ end [C-struct] [` name ` ]
2662
2662
2663
2663
:parameter name: A Dylan variable name.
2664
2664
:parameter slot-spec:
@@ -2831,12 +2831,12 @@ Describing union types
2831
2831
Describes C union types to the *c-ffi *.
2832
2832
2833
2833
:macrocall:
2834
- .. code-block :: dylan
2834
+ .. parsed-literal ::
2835
2835
2836
- define C-union * name*
2837
- [* slot-spec* ; ...] [;]
2838
- [* type-options* ] [;]
2839
- end [C-union] [* name* ]
2836
+ define C-union ` name `
2837
+ [` slot-spec ` ; ...] [;]
2838
+ [` type-options ` ] [;]
2839
+ end [C-union] [` name ` ]
2840
2840
2841
2841
:parameter name: A Dylan variable name.
2842
2842
:parameter slot-spec:
@@ -2969,13 +2969,13 @@ Describing C functions to Dylan
2969
2969
Describes a C function to the *c-ffi *.
2970
2970
2971
2971
:macrocall:
2972
- .. code-block :: dylan
2972
+ .. parsed-literal ::
2973
2973
2974
- define C-function * name*
2975
- [* parameter-spec* ; ...]
2976
- [* result-spec* ;]
2977
- [* function-option* , ...;]
2978
- end [C-function] [* name* ]
2974
+ define C-function ` name `
2975
+ [` parameter-spec ` ; ...]
2976
+ [` result-spec ` ;]
2977
+ [` function-option ` , ...;]
2978
+ end [C-function] [` name ` ]
2979
2979
2980
2980
:parameter name: A Dylan variable name.
2981
2981
:parameter parameter-spec:
@@ -2994,7 +2994,7 @@ Describing C functions to Dylan
2994
2994
.. index ::
2995
2995
single: definition macros; define C-function
2996
2996
2997
- The result of processing a `` define C-function ` ` definition is a
2997
+ The result of processing a :macro: ` define C-function ` definition is a
2998
2998
Dylan function which is bound to name. This function takes Dylan
2999
2999
objects as arguments, converting them to their C representations
3000
3000
according to the types declared for the parameters of the C
@@ -3066,7 +3066,7 @@ Describing C functions to Dylan
3066
3066
Dylan function corresponding to each *input * *output * parameter of
3067
3067
the C function that is specialized as the union of the export type
3068
3068
of the referenced type of the type given for the parameter in
3069
- `` define c-function ` `, and :drm: `#f `. When the C function returns, the
3069
+ :macro: ` define c-function `, and :drm: `#f `. When the C function returns, the
3070
3070
value in the location is accessed and returned as an extra result
3071
3071
from the Dylan function. If an *input * *output * parameter is passed
3072
3072
as :drm: `#f ` from Dylan then a ``NULL `` pointer is passed to the C
@@ -3188,7 +3188,7 @@ Describing C functions to Dylan
3188
3188
.. index ::
3189
3189
single: define C-callable-wrapper definition macro
3190
3190
3191
- In effect, a `` define C-function ` ` such as:
3191
+ In effect, a :macro: ` define C-function ` such as:
3192
3192
3193
3193
.. code-block :: dylan
3194
3194
@@ -3235,14 +3235,13 @@ Describing Dylan functions for use by C
3235
3235
the function.
3236
3236
3237
3237
:macrocall:
3238
- .. code-block :: dylan
3238
+ .. parsed-literal ::
3239
3239
3240
- define C-callable-wrapper [*dylan-rep-name* ]
3241
- of *dylan-function*
3242
- [*parameter-spec* ; ...] [;]
3243
- [*result-spec* ] [;]
3244
- [*function-options* ][;]
3245
- end [C-callable-wrapper]
3240
+ define C-callable-wrapper [`dylan-rep-name `] of `dylan-function `
3241
+ [`parameter-spec ` ; ...] [;]
3242
+ [`result-spec ` ] [;]
3243
+ [`function-options ` ][;]
3244
+ end [C-callable-wrapper]
3246
3245
3247
3246
:parameter dylan-rep-name: A Dylan variable name.
3248
3247
:parameter dylan-function: An instance of :drm: `<function> `.
@@ -3264,7 +3263,7 @@ Describing Dylan functions for use by C
3264
3263
single: define C-function definition macro
3265
3264
single: definition macros; define C-callable wrapper
3266
3265
3267
- The result of processing a `` define C-callable-wrapper ` ` definition
3266
+ The result of processing a :macro: ` define C-callable-wrapper ` definition
3268
3267
is a function with a C entry point with the contract described.
3269
3268
This function takes C values as arguments, converting them to Dylan
3270
3269
representations according to the types declared for the parameters
@@ -3405,7 +3404,7 @@ Describing Dylan functions for use by C
3405
3404
.. index ::
3406
3405
single: definition macros; define C-callable wrapper
3407
3406
3408
- In effect, a `` define C-callable-wrapper ` ` such as:
3407
+ In effect, a :macro: ` define C-callable-wrapper ` such as:
3409
3408
3410
3409
.. code-block :: dylan
3411
3410
@@ -3469,13 +3468,13 @@ of that bridge are implemented within this library.
3469
3468
Describe Objective C selectors to the *c-ffi *.
3470
3469
3471
3470
:macrocall:
3472
- .. code-block :: dylan
3471
+ .. parsed-literal ::
3473
3472
3474
- define objc-selector * name*
3475
- [* parameter-spec* ; ...]
3476
- [* result-spec* ;]
3477
- [* function-option* , ...;]
3478
- end [C-function] [* name* ]
3473
+ define objc-selector ` name `
3474
+ [` parameter-spec ` ; ...]
3475
+ [` result-spec ` ;]
3476
+ [` function-option ` , ...;]
3477
+ end [C-function] [` name ` ]
3479
3478
3480
3479
:parameter name: A Dylan variable name.
3481
3480
:parameter parameter-spec:
@@ -3524,11 +3523,11 @@ This section covers describing and accessing C variables.
3524
3523
Describes C variables to the *c-ffi *.
3525
3524
3526
3525
:macrocall:
3527
- .. code-block :: dylan
3526
+ .. parsed-literal ::
3528
3527
3529
- define C-variable * getter-name* :: * c-type*
3530
- #key * setter* * c-name* import: * boolean*
3531
- end [C-variable]
3528
+ define C-variable ` getter-name ` :: ` c-type `
3529
+ #key ` setter ` ` c-name ` import: ` boolean `
3530
+ end [C-variable]
3532
3531
3533
3532
:parameter getter-name: A Dylan variable name.
3534
3533
:parameter c-type: A Dylan name.
@@ -3569,7 +3568,7 @@ This section covers describing and accessing C variables.
3569
3568
translation is not so simple. A C union or struct has no direct
3570
3569
representation in Dylan. You may only have a reference to the C
3571
3570
object in Dylan through a :class: `<c-pointer> ` object. For this
3572
- reason, `` define c-variable ` ` is not permitted for variables with C
3571
+ reason, :macro: ` define c-variable ` is not permitted for variables with C
3573
3572
aggregate types. Use :macro: `define C-address ` for those variables.
3574
3573
3575
3574
:example:
@@ -3612,11 +3611,11 @@ This section covers describing and accessing C variables.
3612
3611
the location of a C global variable.
3613
3612
3614
3613
:macrocall:
3615
- .. code-block :: dylan
3614
+ .. parsed-literal ::
3616
3615
3617
- define C-address * name* :: * pointer-designator-type*
3618
- #key * c-name* import: * boolean*
3619
- end [C-address] [* name* ]
3616
+ define C-address ` name ` :: ` pointer-designator-type `
3617
+ #key ` c-name ` import: ` boolean `
3618
+ end [C-address] [` name ` ]
3620
3619
3621
3620
:parameter name: A Dylan variable name.
3622
3621
:parameter pointer-designator-type:
@@ -3786,11 +3785,11 @@ function :func:`destroy`.
3786
3785
Allocates an object within the scope of the body of the code.
3787
3786
3788
3787
:macrocall:
3789
- .. code-block :: dylan
3788
+ .. parsed-literal ::
3790
3789
3791
- with-stack-structure (* name* :: * wrapper-type*
3792
- #key * element-count* * extra-bytes* )
3793
- * body*
3790
+ with-stack-structure (` name ` :: ` wrapper-type `
3791
+ #key ` element-count ` ` extra-bytes ` )
3792
+ ` body `
3794
3793
end [with-stack-structure]
3795
3794
3796
3795
:parameter name: A Dylan variable name.
@@ -3904,10 +3903,10 @@ using :macro:`define c-mapped-subtype`.
3904
3903
Passes a C pointer to the contents of a :drm: `<byte-string> `.
3905
3904
3906
3905
:macrocall:
3907
- .. code-block :: dylan
3906
+ .. parsed-literal ::
3908
3907
3909
- with-c-string (* variable* = * string-valued-expression* )
3910
- * body*
3908
+ with-c-string (` variable ` = ` string-valued-expression ` )
3909
+ ` body `
3911
3910
end
3912
3911
3913
3912
:parameter variable: A Dylan variable name.
0 commit comments