From: Uwe Hermann Date: Fri, 18 May 2018 18:11:38 +0000 (+0200) Subject: srd_*inst_find_by_obj(): Suggest inlining for performance reasons. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=29adc171b485ff08a737488e84db08eb67a0590a;p=libsigrokdecode.git srd_*inst_find_by_obj(): Suggest inlining for performance reasons. This has a small, but measurable performance benefit. --- diff --git a/type_decoder.c b/type_decoder.c index 324d2ef..cff242c 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -212,7 +212,7 @@ err: return SRD_ERR_PYTHON; } -static struct srd_decoder_inst *srd_sess_inst_find_by_obj( +static inline struct srd_decoder_inst *srd_sess_inst_find_by_obj( struct srd_session *sess, const GSList *stack, const PyObject *obj) { const GSList *l; @@ -249,7 +249,7 @@ static struct srd_decoder_inst *srd_sess_inst_find_by_obj( * * @since 0.1.0 */ -static struct srd_decoder_inst *srd_inst_find_by_obj( +static inline struct srd_decoder_inst *srd_inst_find_by_obj( const GSList *stack, const PyObject *obj) { struct srd_decoder_inst *di;