eolian: remove @nullable keyword

This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
This commit is contained in:
Daniel Kolesa 2019-05-21 16:01:07 +02:00
parent 34ef9c3139
commit 5ea0195661
29 changed files with 63 additions and 165 deletions

View File

@ -92,7 +92,6 @@ tests/eolian/data/nmsp1_class1.eo \
tests/eolian/data/nmsp1_nmsp11_class2.eo \ tests/eolian/data/nmsp1_nmsp11_class2.eo \
tests/eolian/data/nmsp2_class1.eo \ tests/eolian/data/nmsp2_class1.eo \
tests/eolian/data/no_nmsp.eo \ tests/eolian/data/no_nmsp.eo \
tests/eolian/data/null.eo \
tests/eolian/data/object_impl.eo \ tests/eolian/data/object_impl.eo \
tests/eolian/data/object_impl_add.eo \ tests/eolian/data/object_impl_add.eo \
tests/eolian/data/override.eo \ tests/eolian/data/override.eo \

View File

@ -370,7 +370,6 @@ ffi.cdef [[
const Eolian_Expression *eolian_parameter_default_value_get(const Eolian_Function_Parameter *param); const Eolian_Expression *eolian_parameter_default_value_get(const Eolian_Function_Parameter *param);
const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian_Function_Parameter *param); const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian_Function_Parameter *param);
Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc); Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
Eina_Bool eolian_parameter_is_nullable(const Eolian_Function_Parameter *param_desc);
Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc); Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc);
const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
const Eolian_Expression *eolian_function_return_default_value_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); const Eolian_Expression *eolian_function_return_default_value_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@ -1268,10 +1267,6 @@ ffi.metatype("Eolian_Function_Parameter", {
return eolian.eolian_parameter_is_nonull(self) ~= 0 return eolian.eolian_parameter_is_nonull(self) ~= 0
end, end,
is_nullable = function(self)
return eolian.eolian_parameter_is_nullable(self) ~= 0
end,
is_optional = function(self) is_optional = function(self)
return eolian.eolian_parameter_is_optional(self) ~= 0 return eolian.eolian_parameter_is_optional(self) ~= 0
end end

View File

@ -193,11 +193,11 @@ class @beta Efl.Net.Control.Manager extends Efl.Loop_Consumer {
agent_reply { agent_reply {
[[If event "agent_request_input" was emitted, this will reply with the requested data]] [[If event "agent_request_input" was emitted, this will reply with the requested data]]
params { params {
name: string @nullable; [[If @Efl.Net.Control.Agent_Request_Input_Field.name was present, this should contain the network name or the 'ssid' parameter should be used.]] name: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.name was present, this should contain the network name or the 'ssid' parameter should be used.]]
@cref ssid: Eina.Slice @nullable; [[If @Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should contain the network SSID or the 'name' parameter should be used.]] @cref ssid: Eina.Slice; [[If @Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should contain the network SSID or the 'name' parameter should be used.]]
username: string @nullable; [[If @Efl.Net.Control.Agent_Request_Input_Field.username was present, this should contain the identity or username]] username: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.username was present, this should contain the identity or username]]
passphrase: string @nullable; [[If @Efl.Net.Control.Agent_Request_Input_Field.passphrase was present, this should contain the password or passphrase, more details on how it should be interpreted was given in Efl.Net.Control.Agent_Request_Input.passphrase_type.]] passphrase: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.passphrase was present, this should contain the password or passphrase, more details on how it should be interpreted was given in Efl.Net.Control.Agent_Request_Input.passphrase_type.]]
wps: string @nullable; [[If @Efl.Net.Control.Agent_Request_Input_Field.wps was present, this should contain the WPS PIN or an empty string "" to use the WPS push button instead.]] wps: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.wps was present, this should contain the WPS PIN or an empty string "" to use the WPS push button instead.]]
} }
} }
} }

View File

@ -109,7 +109,7 @@ interface @beta Efl.Net.Dialer extends Efl.Net.Socket {
} }
events { events {
/* FIXME: Might be NULL, but @nullable does not work on event types */ /* tag nullable once supported by eolian */
dialer,resolved: string; [[Notifies @.address_dial was resolved to dialer,resolved: string; [[Notifies @.address_dial was resolved to
@Efl.Net.Socket.address_remote. @Efl.Net.Socket.address_remote.

View File

@ -75,7 +75,7 @@ class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Sock
It's only used if @.hostname_verify is $true. It's only used if @.hostname_verify is $true.
]] ]]
values { values {
hostname_override: string @nullable; [[Hostname for this socket]] hostname_override: string; [[Hostname for this socket]]
} }
} }
} }

View File

@ -122,7 +122,7 @@ class @beta Efl.Net.Ssl.Context extends Efl.Object {
It's only used if @.hostname_verify is $true. It's only used if @.hostname_verify is $true.
]] ]]
values { values {
hostname: string @nullable; [[Hostname for this socket]] hostname: string; [[Hostname for this socket]]
} }
} }
} }

View File

@ -235,7 +235,7 @@ interface Efl.Canvas.Scene
object,focus,in: Efl.Input.Focus; [[Called when object got focus]] object,focus,in: Efl.Input.Focus; [[Called when object got focus]]
object,focus,out: Efl.Input.Focus; [[Called when object lost focus]] object,focus,out: Efl.Input.Focus; [[Called when object lost focus]]
render,pre: void; [[Called when pre render happens]] render,pre: void; [[Called when pre render happens]]
/* FIXME: event_info can be NULL, but @nullable tag does not work on events yet */ /* tag nullable once supported by eolian */
render,post @beta: Efl.Gfx.Event.Render_Post; [[Called when post render happens]] render,post @beta: Efl.Gfx.Event.Render_Post; [[Called when post render happens]]
device,changed @beta : Efl.Input.Device; [[Called when input device changed]] device,changed @beta : Efl.Input.Device; [[Called when input device changed]]
device,added @beta: Efl.Input.Device; [[Called when input device was added]] device,added @beta: Efl.Input.Device; [[Called when input device was added]]

View File

@ -174,7 +174,7 @@ interface @beta Efl.Gfx.Buffer
$slice should not be the return value of @.buffer_managed_get. $slice should not be the return value of @.buffer_managed_get.
]] ]]
params { params {
@cref slice: Eina.Slice @nullable; [[If $null, allocates an empty buffer]] @cref slice: Eina.Slice; [[If $null, allocates an empty buffer]]
@in size: Eina.Size2D; [[The size in pixels.]] @in size: Eina.Size2D; [[The size in pixels.]]
@in stride: int @optional; [[If 0, automatically guessed from the $width.]] @in stride: int @optional; [[If 0, automatically guessed from the $width.]]
@in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]] @in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]]
@ -199,7 +199,7 @@ interface @beta Efl.Gfx.Buffer
internally. internally.
]] ]]
params { params {
@cref slice: Eina.Slice @nullable; [[If $null, detaches the previous buffer.]] @cref slice: Eina.Slice; [[If $null, detaches the previous buffer.]]
@in size: Eina.Size2D; [[The size in pixels.]] @in size: Eina.Size2D; [[The size in pixels.]]
@in stride: int @optional; [[If 0, automatically guessed from the $width.]] @in stride: int @optional; [[If 0, automatically guessed from the $width.]]
@in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]] @in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]]

View File

@ -18,7 +18,7 @@ mixin @beta Efl.Ui.Format
]] ]]
} }
values { values {
func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]] func: Efl.Ui.Format_Func_Cb; [[The format function callback]]
} }
} }
@property format_string { @property format_string {
@ -35,7 +35,7 @@ mixin @beta Efl.Ui.Format
as in $"%.0f %%". as in $"%.0f %%".
]] ]]
values { values {
units: string @nullable; [[The format string for $obj's units label.]] units: string; [[The format string for $obj's units label.]]
} }
} }
} }

View File

@ -95,7 +95,7 @@ class @beta Efl.Ui.Clock extends Efl.Ui.Layout_Base
*/ */
set {} get {} set {} get {}
values { values {
fmt: string @nullable; [[The clock format.]] fmt: string; [[The clock format.]]
} }
} }
@property pause { @property pause {

View File

@ -38,8 +38,8 @@ class @beta Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller
This should be called upon constructing the object. This should be called upon constructing the object.
]] ]]
params { params {
text_obj: Efl.Canvas.Text @nullable; [[The text object to query]] text_obj: Efl.Canvas.Text; [[The text object to query]]
text_table: Efl.Ui.Table @nullable; [[The table container of text_table: Efl.Ui.Table; [[The table container of
the $text_obj]] the $text_obj]]
} }
} }

View File

@ -27,7 +27,7 @@ class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
[[Set a page transition effect]] [[Set a page transition effect]]
} }
values { values {
transition: Efl.Page.Transition @nullable; [[transition effect]] transition: Efl.Page.Transition; [[transition effect]]
} }
} }
@property indicator { @property indicator {
@ -40,7 +40,7 @@ class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
[[Set a page indicator]] [[Set a page indicator]]
} }
values { values {
indicator: Efl.Page.Indicator @nullable; [[indicator class]] indicator: Efl.Page.Indicator; [[indicator class]]
} }
} }
@property current_page { @property current_page {

View File

@ -33,7 +33,7 @@ class @beta Efl.Ui.Radio extends Efl.Ui.Check implements Efl.Access.Widget.Actio
]] ]]
} }
values { values {
valuep: ptr(int) @nullable; [[Pointer to the integer to modify]] valuep: ptr(int); [[Pointer to the integer to modify]]
} }
} }
@property selected_object { @property selected_object {

View File

@ -17,7 +17,7 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements
set { set {
} }
values { values {
pan: Efl.Ui.Pan @nullable; [[Pan object]] pan: Efl.Ui.Pan; [[Pan object]]
} }
} }
} }

View File

@ -360,7 +360,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable,
} }
events { events {
changed: void; [[Called when entry changes]] changed: void; [[Called when entry changes]]
/* FIXME: Sometimes it can be NULL but @nullable does not work on events */ /* can be NULL, tag nullable once Eolian supports it */
changed,user: Efl.Ui.Text_Change_Info; changed,user: Efl.Ui.Text_Change_Info;
[[The text object has changed due to user interaction]] [[The text object has changed due to user interaction]]
validate: Elm.Validate_Content; [[Called when validating]] validate: Elm.Validate_Content; [[Called when validating]]

View File

@ -53,8 +53,8 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
[[Returns the current cursor name.]] [[Returns the current cursor name.]]
} }
values { values {
cursor: string @nullable; [[The cursor name, defined either cursor: string; [[The cursor name, defined either
by the display system or the theme.]] by the display system or the theme.]]
} }
} }
@property cursor_style @beta { @property cursor_style @beta {
@ -104,7 +104,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
[[Sets the new resize object for this widget.]] [[Sets the new resize object for this widget.]]
} }
values { values {
sobj: Efl.Canvas.Object @nullable; sobj: Efl.Canvas.Object;
[[A canvas object (often a @Efl.Canvas.Layout object).]] [[A canvas object (often a @Efl.Canvas.Layout object).]]
} }
} }
@ -216,7 +216,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
get { get {
} }
values { values {
parent: Efl.Ui.Widget @nullable; [[Widget parent object]] parent: Efl.Ui.Widget; [[Widget parent object]]
} }
} }
@ -231,7 +231,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
out loud, instead $txt will be read out. out loud, instead $txt will be read out.
]] ]]
values { values {
txt: string @nullable; [[Accessibility text description.]] txt: string; [[Accessibility text description.]]
} }
} }
on_access_activate @protected @beta { on_access_activate @protected @beta {

View File

@ -303,7 +303,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
type @Efl.Canvas.Image or @Efl.Ui.Image are allowed. type @Efl.Canvas.Image or @Efl.Ui.Image are allowed.
]] ]]
values { values {
icon: Efl.Canvas.Object @nullable; icon: Efl.Canvas.Object;
[[The image object to use for an icon.]] [[The image object to use for an icon.]]
} }
} }
@ -314,7 +314,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
the object to use for the window icon. the object to use for the window icon.
]] ]]
values { values {
icon: const(Efl.Canvas.Object) @nullable; icon: const(Efl.Canvas.Object);
[[The Evas image object to use for an icon.]] [[The Evas image object to use for an icon.]]
} }
} }
@ -444,7 +444,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
get { get {
} }
values { values {
name: string @nullable; [[Window name]] name: string; [[Window name]]
} }
} }
@property win_type @beta { @property win_type @beta {
@ -797,7 +797,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
get { get {
} }
values { values {
style: string @nullable; [[The name of the focus highlight style.]] style: string; [[The name of the focus highlight style.]]
} }
} }
@property focus_highlight_animate { @property focus_highlight_animate {

View File

@ -287,7 +287,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the content has been moved up.]] [[Set the callback to run when the content has been moved up.]]
} }
values { values {
scroll_up_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] scroll_up_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property hbar_drag_cb { @property hbar_drag_cb {
@ -295,7 +295,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the horizontal scrollbar is dragged.]] [[Set the callback to run when the horizontal scrollbar is dragged.]]
} }
values { values {
hbar_drag_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] hbar_drag_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property drag_start_cb { @property drag_start_cb {
@ -303,7 +303,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when dragging of the contents has started.]] [[Set the callback to run when dragging of the contents has started.]]
} }
values { values {
drag_start_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] drag_start_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property freeze { @property freeze {
@ -319,7 +319,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[When the viewport is resized, the callback is called.]] [[When the viewport is resized, the callback is called.]]
} }
values { values {
viewport_resize_cb: Elm_Interface_Scrollable_Resize_Cb @nullable; [[The callback]] viewport_resize_cb: Elm_Interface_Scrollable_Resize_Cb; [[The callback]]
} }
} }
@property scroll_left_cb { @property scroll_left_cb {
@ -327,7 +327,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the content has been moved to the left]] [[Set the callback to run when the content has been moved to the left]]
} }
values { values {
scroll_left_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] scroll_left_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property vbar_press_cb { @property vbar_press_cb {
@ -335,7 +335,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the vertical scrollbar is pressed.]] [[Set the callback to run when the vertical scrollbar is pressed.]]
} }
values { values {
vbar_press_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] vbar_press_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property hbar_press_cb { @property hbar_press_cb {
@ -343,7 +343,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the horizontal scrollbar is pressed.]] [[Set the callback to run when the horizontal scrollbar is pressed.]]
} }
values { values {
hbar_press_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] hbar_press_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property hbar_unpress_cb { @property hbar_unpress_cb {
@ -351,7 +351,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the horizontal scrollbar is unpressed.]] [[Set the callback to run when the horizontal scrollbar is unpressed.]]
} }
values { values {
hbar_unpress_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] hbar_unpress_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property drag_stop_cb { @property drag_stop_cb {
@ -359,7 +359,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when dragging of the contents has stopped.]] [[Set the callback to run when dragging of the contents has stopped.]]
} }
values { values {
drag_stop_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] drag_stop_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property extern_pan { @property extern_pan {
@ -367,7 +367,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
set { set {
} }
values { values {
pan: Efl.Canvas.Object @nullable; [[Pan object]] pan: Efl.Canvas.Object; [[Pan object]]
} }
} }
@property page_change_cb { @property page_change_cb {
@ -375,7 +375,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the visible page changes.]] [[Set the callback to run when the visible page changes.]]
} }
values { values {
page_change_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] page_change_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property hold { @property hold {
@ -391,7 +391,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the scrolling animation has started.]] [[Set the callback to run when the scrolling animation has started.]]
} }
values { values {
animate_start_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] animate_start_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property scroll_down_cb { @property scroll_down_cb {
@ -399,7 +399,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the content has been moved down.]] [[Set the callback to run when the content has been moved down.]]
} }
values { values {
scroll_down_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] scroll_down_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property page_relative { @property page_relative {
@ -416,7 +416,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the content has been moved.]] [[Set the callback to run when the content has been moved.]]
} }
values { values {
scroll_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] scroll_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property animate_stop_cb { @property animate_stop_cb {
@ -424,7 +424,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the scrolling animation has stopped.]] [[Set the callback to run when the scrolling animation has stopped.]]
} }
values { values {
animate_stop_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] animate_stop_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property content_min_limit_cb { @property content_min_limit_cb {
@ -432,7 +432,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
set { set {
} }
values { values {
min_limit_cb: Elm_Interface_Scrollable_Min_Limit_Cb @nullable; [[The callback]] min_limit_cb: Elm_Interface_Scrollable_Min_Limit_Cb; [[The callback]]
} }
} }
@property scroll_right_cb { @property scroll_right_cb {
@ -440,7 +440,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the content has been moved to the right.]] [[Set the callback to run when the content has been moved to the right.]]
} }
values { values {
scroll_right_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] scroll_right_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property scrollable_content { @property scrollable_content {
@ -448,7 +448,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
set { set {
} }
values { values {
content: Efl.Canvas.Object @nullable; [[Content object]] content: Efl.Canvas.Object; [[Content object]]
} }
} }
@property edge_left_cb { @property edge_left_cb {
@ -456,7 +456,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the left edge of the content has been reached.]] [[Set the callback to run when the left edge of the content has been reached.]]
} }
values { values {
edge_left_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] edge_left_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property vbar_drag_cb { @property vbar_drag_cb {
@ -464,7 +464,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the horizontal scrollbar is dragged.]] [[Set the callback to run when the horizontal scrollbar is dragged.]]
} }
values { values {
vbar_drag_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] vbar_drag_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property vbar_unpress_cb { @property vbar_unpress_cb {
@ -472,7 +472,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the horizontal scrollbar is unpressed.]] [[Set the callback to run when the horizontal scrollbar is unpressed.]]
} }
values { values {
vbar_unpress_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] vbar_unpress_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property edge_bottom_cb { @property edge_bottom_cb {
@ -480,7 +480,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the bottom edge of the content has been reached.]] [[Set the callback to run when the bottom edge of the content has been reached.]]
} }
values { values {
edge_bottom_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] edge_bottom_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property edge_right_cb { @property edge_right_cb {
@ -488,7 +488,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the right edge of the content has been reached.]] [[Set the callback to run when the right edge of the content has been reached.]]
} }
values { values {
edge_right_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] edge_right_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property edge_top_cb { @property edge_top_cb {
@ -496,7 +496,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol
[[Set the callback to run when the top edge of the content has been reached.]] [[Set the callback to run when the top edge of the content has been reached.]]
} }
values { values {
edge_top_cb: Elm_Interface_Scrollable_Cb @nullable; [[The callback]] edge_top_cb: Elm_Interface_Scrollable_Cb; [[The callback]]
} }
} }
@property objects { @property objects {

View File

@ -91,7 +91,7 @@ abstract Efl.Object
get { get {
} }
values { values {
parent: Efl.Object @nullable; [[The new parent.]] parent: Efl.Object; [[The new parent.]]
} }
} }
@property name { @property name {
@ -108,7 +108,7 @@ abstract Efl.Object
get { get {
} }
values { values {
name: string @nullable; [[The name.]] name: string; [[The name.]]
} }
} }
@property comment { @property comment {
@ -123,7 +123,7 @@ abstract Efl.Object
get { get {
} }
values { values {
comment: string @nullable; [[The comment.]] comment: string; [[The comment.]]
} }
} }
debug_name_override { debug_name_override {

View File

@ -1791,16 +1791,6 @@ EAPI const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian
*/ */
EAPI Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc); EAPI Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
/*
* @brief Indicates if a parameter is nullable.
*
* @param[in] param_desc parameter handle
* @return EINA_TRUE if nullable, EINA_FALSE otherwise
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_parameter_is_nullable(const Eolian_Function_Parameter *param_desc);
/* /*
* @brief Indicates if a parameter is optional. * @brief Indicates if a parameter is optional.
* *

View File

@ -40,13 +40,6 @@ eolian_parameter_is_nonull(const Eolian_Function_Parameter *param)
return param->nonull; return param->nonull;
} }
EAPI Eina_Bool
eolian_parameter_is_nullable(const Eolian_Function_Parameter *param)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(param, EINA_FALSE);
return param->nullable;
}
EAPI Eina_Bool EAPI Eina_Bool
eolian_parameter_is_optional(const Eolian_Function_Parameter *param) eolian_parameter_is_optional(const Eolian_Function_Parameter *param)
{ {

View File

@ -21,7 +21,10 @@ enum Tokens
}; };
/* all keywords in eolian, they can still be used as names (they're TOK_VALUE) /* all keywords in eolian, they can still be used as names (they're TOK_VALUE)
* they just fill in the "kw" field of the token */ * they just fill in the "kw" field of the token
*
* reserved for the future: @nullable
*/
#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
\ \
KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \ KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \

View File

@ -907,7 +907,7 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
Eina_Bool is_vals) Eina_Bool is_vals)
{ {
Eina_Bool has_nonull = EINA_FALSE, has_optional = EINA_FALSE, Eina_Bool has_nonull = EINA_FALSE, has_optional = EINA_FALSE,
has_nullable = EINA_FALSE, has_owned = EINA_FALSE; has_owned = EINA_FALSE;
Eina_Bool cref = (ls->t.kw == KW_at_cref); Eina_Bool cref = (ls->t.kw == KW_at_cref);
Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter)); Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter));
par->param_dir = EOLIAN_IN_PARAM; par->param_dir = EOLIAN_IN_PARAM;
@ -956,8 +956,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
for (;;) switch (ls->t.kw) for (;;) switch (ls->t.kw)
{ {
case KW_at_nonull: case KW_at_nonull:
if (has_nullable)
eo_lexer_syntax_error(ls, "both nullable and nonull specified");
CASE_LOCK(ls, nonull, "nonull qualifier") CASE_LOCK(ls, nonull, "nonull qualifier")
par->nonull = EINA_TRUE; par->nonull = EINA_TRUE;
eo_lexer_get(ls); eo_lexer_get(ls);
@ -967,13 +965,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
par->optional = EINA_TRUE; par->optional = EINA_TRUE;
eo_lexer_get(ls); eo_lexer_get(ls);
break; break;
case KW_at_nullable:
if (has_nonull)
eo_lexer_syntax_error(ls, "both nullable and nonull specified");
CASE_LOCK(ls, nullable, "nullable qualifier");
par->nullable = EINA_TRUE;
eo_lexer_get(ls);
break;
case KW_at_owned: case KW_at_owned:
CASE_LOCK(ls, owned, "owned qualifier"); CASE_LOCK(ls, owned, "owned qualifier");
par->type->owned = EINA_TRUE; par->type->owned = EINA_TRUE;

View File

@ -252,7 +252,6 @@ struct _Eolian_Function_Parameter
Eolian_Documentation *doc; Eolian_Documentation *doc;
Eolian_Parameter_Dir param_dir; Eolian_Parameter_Dir param_dir;
Eina_Bool nonull :1; /* True if this argument cannot be NULL - deprecated */ Eina_Bool nonull :1; /* True if this argument cannot be NULL - deprecated */
Eina_Bool nullable :1; /* True if this argument is nullable */
Eina_Bool optional :1; /* True if this argument is optional */ Eina_Bool optional :1; /* True if this argument is optional */
}; };

View File

@ -963,7 +963,7 @@ class Function(Object):
class Function_Parameter(Object): class Function_Parameter(Object):
def __repr__(self): def __repr__(self):
return "<eolian.Function_Parameter '{0.name}', type={0.type}," \ return "<eolian.Function_Parameter '{0.name}', type={0.type}," \
" optional={0.is_optional}, nullable={0.is_nullable}>".format(self) " optional={0.is_optional}>".format(self)
@cached_property @cached_property
def direction(self): def direction(self):
@ -978,10 +978,6 @@ class Function_Parameter(Object):
def is_nonull(self): def is_nonull(self):
return bool(lib.eolian_parameter_is_nonull(self)) return bool(lib.eolian_parameter_is_nonull(self))
@cached_property
def is_nullable(self):
return bool(lib.eolian_parameter_is_nullable(self))
@cached_property @cached_property
def is_optional(self): def is_optional(self):
return bool(lib.eolian_parameter_is_optional(self)) return bool(lib.eolian_parameter_is_optional(self))

View File

@ -403,10 +403,6 @@ lib.eolian_parameter_documentation_get.restype = c_void_p
lib.eolian_parameter_is_nonull.argtypes = (c_void_p,) lib.eolian_parameter_is_nonull.argtypes = (c_void_p,)
lib.eolian_parameter_is_nonull.restype = c_bool lib.eolian_parameter_is_nonull.restype = c_bool
# EAPI Eina_Bool eolian_parameter_is_nullable(const Eolian_Function_Parameter *param_desc);
lib.eolian_parameter_is_nullable.argtypes = (c_void_p,)
lib.eolian_parameter_is_nullable.restype = c_bool
# EAPI Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc); # EAPI Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc);
lib.eolian_parameter_is_optional.argtypes = (c_void_p,) lib.eolian_parameter_is_optional.argtypes = (c_void_p,)
lib.eolian_parameter_is_optional.restype = c_bool lib.eolian_parameter_is_optional.restype = c_bool

View File

@ -381,7 +381,6 @@ class TestEolianFunction(unittest.TestCase):
self.assertEqual(p.name, 'add') self.assertEqual(p.name, 'add')
self.assertIsNone(p.default_value) self.assertIsNone(p.default_value)
self.assertFalse(p.is_nonull) # TODO is correct ?? 'add' can be null? self.assertFalse(p.is_nonull) # TODO is correct ?? 'add' can be null?
self.assertFalse(p.is_nullable)
self.assertFalse(p.is_optional) self.assertFalse(p.is_optional)
self.assertEqual(p.type.name, 'double') self.assertEqual(p.type.name, 'double')
self.assertIsInstance(p.documentation, eolian.Documentation) self.assertIsInstance(p.documentation, eolian.Documentation)

View File

@ -1,12 +0,0 @@
class Null {
methods {
foo {
params {
x: ptr(char);
y: ptr(char) @nullable;
z: ptr(char) @optional;
w: ptr(char) @optional @nullable;
}
}
}
}

View File

@ -1010,56 +1010,6 @@ EFL_START_TEST(eolian_free_func)
} }
EFL_END_TEST EFL_END_TEST
EFL_START_TEST(eolian_null)
{
const Eolian_Class *class;
const Eolian_Function *func;
const Eolian_Function_Parameter *param;
const Eolian_Unit *unit;
Eina_Iterator *iter;
Eolian_State *eos = eolian_state_new();
/* Parsing */
fail_if(!eolian_state_directory_add(eos, TESTS_SRC_DIR"/data"));
fail_if(!(unit = eolian_state_file_parse(eos, "null.eo")));
fail_if(!(class = eolian_unit_class_by_name_get(unit, "Null")));
fail_if(!(func = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
fail_if(!(iter = eolian_function_parameters_get(func)));
/* no qualifiers */
fail_if(!(eina_iterator_next(iter, (void**)&param)));
fail_if(strcmp(eolian_parameter_name_get(param), "x"));
fail_if(eolian_parameter_is_nullable(param));
fail_if(eolian_parameter_is_optional(param));
/* nullable */
fail_if(!(eina_iterator_next(iter, (void**)&param)));
fail_if(strcmp(eolian_parameter_name_get(param), "y"));
fail_if(!eolian_parameter_is_nullable(param));
fail_if(eolian_parameter_is_optional(param));
/* optional */
fail_if(!(eina_iterator_next(iter, (void**)&param)));
fail_if(strcmp(eolian_parameter_name_get(param), "z"));
fail_if(eolian_parameter_is_nullable(param));
fail_if(!eolian_parameter_is_optional(param));
/* both */
fail_if(!(eina_iterator_next(iter, (void**)&param)));
fail_if(strcmp(eolian_parameter_name_get(param), "w"));
fail_if(!eolian_parameter_is_nullable(param));
fail_if(!eolian_parameter_is_optional(param));
fail_if(eina_iterator_next(iter, (void**)&param));
eina_iterator_free(iter);
eolian_state_free(eos);
}
EFL_END_TEST
EFL_START_TEST(eolian_import) EFL_START_TEST(eolian_import)
{ {
const Eolian_Class *class; const Eolian_Class *class;
@ -1654,7 +1604,6 @@ void eolian_parsing_test(TCase *tc)
tcase_add_test(tc, eolian_enum); tcase_add_test(tc, eolian_enum);
tcase_add_test(tc, eolian_class_funcs); tcase_add_test(tc, eolian_class_funcs);
tcase_add_test(tc, eolian_free_func); tcase_add_test(tc, eolian_free_func);
tcase_add_test(tc, eolian_null);
tcase_add_test(tc, eolian_import); tcase_add_test(tc, eolian_import);
tcase_add_test(tc, eolian_docs); tcase_add_test(tc, eolian_docs);
tcase_add_test(tc, eolian_function_types); tcase_add_test(tc, eolian_function_types);