]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd_*inst_find_by_obj(): Suggest inlining for performance reasons.
authorUwe Hermann <redacted>
Fri, 18 May 2018 18:11:38 +0000 (20:11 +0200)
committerUwe Hermann <redacted>
Fri, 18 May 2018 18:54:23 +0000 (20:54 +0200)
This has a small, but measurable performance benefit.

type_decoder.c

index 324d2ef34e3066f679e8038cacbd0db141cdd81f..cff242c79999e83d3095dbb1293c0d501cc1bada 100644 (file)
@@ -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;