@@ -170,9 +170,10 @@ NNFW_STATUS nnfw_register_custom_op_info(nnfw_session *session, const char *id,
170170 return reinterpret_cast <Session *>(session)->register_custom_operation (id, info->eval_function );
171171}
172172
173- NNFW_STATUS nnfw_apply_tensorinfo (nnfw_session *, uint32_t , nnfw_tensorinfo)
173+ NNFW_STATUS nnfw_apply_tensorinfo (nnfw_session *session , uint32_t , nnfw_tensorinfo)
174174{
175- return Session::deprecated (" nnfw_apply_tensorinfo: Deprecated" );
175+ NNFW_RETURN_ERROR_IF_NULL (session);
176+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_apply_tensorinfo: Deprecated" );
176177}
177178
178179NNFW_STATUS nnfw_set_input_tensorinfo (nnfw_session *session, uint32_t index,
@@ -188,9 +189,10 @@ NNFW_STATUS nnfw_set_available_backends(nnfw_session *session, const char *backe
188189 return reinterpret_cast <Session *>(session)->set_available_backends (backends);
189190}
190191
191- NNFW_STATUS nnfw_set_op_backend (nnfw_session *, const char *, const char *)
192+ NNFW_STATUS nnfw_set_op_backend (nnfw_session *session , const char *, const char *)
192193{
193- return Session::deprecated (" nnfw_set_op_backend: Deprecated" );
194+ NNFW_RETURN_ERROR_IF_NULL (session);
195+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_set_op_backend: Deprecated" );
194196}
195197
196198NNFW_STATUS nnfw_query_info_u32 (nnfw_session *session, NNFW_INFO_ID id, uint32_t *val)
@@ -230,19 +232,22 @@ NNFW_STATUS nnfw_set_backends_per_operation(nnfw_session *session, const char *b
230232 return reinterpret_cast <Session *>(session)->set_backends_per_operation (backend_settings);
231233}
232234
233- NNFW_STATUS nnfw_prepare_pipeline (nnfw_session *, const char *)
235+ NNFW_STATUS nnfw_prepare_pipeline (nnfw_session *session , const char *)
234236{
235- return Session::deprecated (" nnfw_prepare_pipeline: Deprecated" );
237+ NNFW_RETURN_ERROR_IF_NULL (session);
238+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_prepare_pipeline: Deprecated" );
236239}
237240
238- NNFW_STATUS nnfw_push_pipeline_input (nnfw_session *, void *, void *)
241+ NNFW_STATUS nnfw_push_pipeline_input (nnfw_session *session , void *, void *)
239242{
240- return Session::deprecated (" nnfw_push_pipeline_input: Deprecated" );
243+ NNFW_RETURN_ERROR_IF_NULL (session);
244+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_push_pipeline_input: Deprecated" );
241245}
242246
243- NNFW_STATUS nnfw_pop_pipeline_output (nnfw_session *, void *)
247+ NNFW_STATUS nnfw_pop_pipeline_output (nnfw_session *session , void *)
244248{
245- return Session::deprecated (" nnfw_pop_pipeline_output: Deprecated" );
249+ NNFW_RETURN_ERROR_IF_NULL (session);
250+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_pop_pipeline_output: Deprecated" );
246251}
247252
248253NNFW_STATUS nnfw_set_workspace (nnfw_session *session, const char *dir)
0 commit comments