Obsolete
/
ipc.cr-old
Archived
3
0
Fork 0

Fix build.

master
Philippe Pittoli 2023-02-01 04:32:24 +01:00
parent 93b9bcbaa2
commit 7bb91b3509
2 changed files with 11 additions and 11 deletions

View File

@ -5,20 +5,20 @@ require "./ipc.cr"
class IPC::CBOR
include ::CBOR::Serializable
@[::CBOR::Field(ignored: true)]
getter type = -1
#@[::CBOR::Field(ignored: true)]
#getter type = -1
class_getter type = -1
property id : ::CBOR::Any?
def type
@@type
end
macro message(id, type, &block)
class {{id}} < ::IPC::CBOR
include ::CBOR::Serializable
@@type = {{type}}
def type
@@type
end
{{yield}}
end

View File

@ -5,20 +5,20 @@ require "./ipc.cr"
class IPC::JSON
include ::JSON::Serializable
@[::JSON::Field(ignored: true)]
getter type = -1
class_getter type = -1
#@[::JSON::Field(ignored: true)]
class_property type = -1
property id : ::JSON::Any?
def type
@@type
end
macro message(id, type, &block)
class {{id}} < ::IPC::JSON
include ::JSON::Serializable
@@type = {{type}}
def type
@@type
end
{{yield}}
end